Synergy Software Package User's Manual

#include <r_cgc_api.h>

Data Fields

ssp_err_t(* init )(void)
 
ssp_err_t(* clocksCfg )(cgc_clocks_cfg_t const *const p_clock_cfg)
 
ssp_err_t(* clockStart )(cgc_clock_t clock_source, cgc_clock_cfg_t *p_clock_cfg)
 
ssp_err_t(* clockStop )(cgc_clock_t clock_source)
 
ssp_err_t(* systemClockSet )(cgc_clock_t clock_source, cgc_system_clock_cfg_t const *const p_clock_cfg)
 
ssp_err_t(* systemClockGet )(cgc_clock_t *p_clock_source, cgc_system_clock_cfg_t *p_set_clock_cfg)
 
ssp_err_t(* systemClockFreqGet )(cgc_system_clocks_t clock, uint32_t *p_freq_hz)
 
ssp_err_t(* clockCheck )(cgc_clock_t clock_source)
 
ssp_err_t(* oscStopDetect )(void(*p_callback)(cgc_callback_args_t *p_args), bool enable)
 
ssp_err_t(* oscStopStatusClear )(void)
 
ssp_err_t(* busClockOutCfg )(cgc_bclockout_dividers_t divider)
 
ssp_err_t(* busClockOutEnable )(void)
 
ssp_err_t(* busClockOutDisable )(void)
 
ssp_err_t(* clockOutCfg )(cgc_clock_t clock, cgc_clockout_dividers_t divider)
 
ssp_err_t(* clockOutEnable )(void)
 
ssp_err_t(* clockOutDisable )(void)
 
ssp_err_t(* lcdClockCfg )(cgc_clock_t clock)
 
ssp_err_t(* lcdClockEnable )(void)
 
ssp_err_t(* lcdClockDisable )(void)
 
ssp_err_t(* sdadcClockCfg )(cgc_clock_t clock)
 
ssp_err_t(* sdadcClockEnable )(void)
 
ssp_err_t(* sdadcClockDisable )(void)
 
ssp_err_t(* sdramClockOutEnable )(void)
 
ssp_err_t(* sdramClockOutDisable )(void)
 
ssp_err_t(* usbClockCfg )(cgc_usb_clock_div_t divider)
 
ssp_err_t(* systickUpdate )(uint32_t period_count, cgc_systick_period_units_t units)
 
ssp_err_t(* versionGet )(ssp_version_t *p_version)
 

Detailed Description

CGC functions implemented at the HAL layer follow this API.

Field Documentation

◆ busClockOutCfg

ssp_err_t(* cgc_api_t::busClockOutCfg) (cgc_bclockout_dividers_t divider)

Configure the bus clock output secondary divider. The primary divider is set using the bsp clock configuration and the cgc_api_t::systemClockSet function (S7G2 and S3A7 only).

Implemented as
Parameters
[in]dividerThe divider of 1 or 2 of the clock source.

◆ busClockOutDisable

ssp_err_t(* cgc_api_t::busClockOutDisable) (void)

Disable the bus clock output (S7G2 and S3A7 only).

Implemented as

◆ busClockOutEnable

ssp_err_t(* cgc_api_t::busClockOutEnable) (void)

Enable the bus clock output (S7G2 and S3A7 only).

Implemented as

◆ clockCheck

ssp_err_t(* cgc_api_t::clockCheck) (cgc_clock_t clock_source)

Check the stability of the selected clock.

Implemented as
Parameters
[in]clock_sourceWhich clock source to check for stability.

◆ clockOutCfg

ssp_err_t(* cgc_api_t::clockOutCfg) (cgc_clock_t clock, cgc_clockout_dividers_t divider)

Configure clockOut.

Implemented as
Parameters
[in]clockClock source.
[in]dividerDivider of between 1 and 128 of the clock source.

◆ clockOutDisable

ssp_err_t(* cgc_api_t::clockOutDisable) (void)

Disable clock output on the CLKOUT pin. The source of the clock is controlled by cgc_api_t::clockOutCfg.

Implemented as

◆ clockOutEnable

ssp_err_t(* cgc_api_t::clockOutEnable) (void)

Enable clock output on the CLKOUT pin. The source of the clock is controlled by cgc_api_t::clockOutCfg.

Implemented as

◆ clocksCfg

ssp_err_t(* cgc_api_t::clocksCfg) (cgc_clocks_cfg_t const *const p_clock_cfg)

Configure all system clocks.

Implemented as
Note
The BSP module calls this function at startup, but it can also be called from the application to change clocks at runtime.
Parameters
[in]p_clock_cfgPointer to a structure that contains the dividers or multipliers to be used when configuring the PLL.

◆ clockStart

ssp_err_t(* cgc_api_t::clockStart) (cgc_clock_t clock_source, cgc_clock_cfg_t *p_clock_cfg)

Start a clock.

Implemented as
Precondition
Clock to be started must not be running prior to calling this function or an error will be returned.
Parameters
[in]clock_sourceClock source to initialize.
[in]p_clock_cfgPointer to a structure that contains the dividers or multipliers to be used when configuring the PLL.

◆ clockStop

ssp_err_t(* cgc_api_t::clockStop) (cgc_clock_t clock_source)

Stop a clock.

Implemented as
Precondition
Clock to be stopped must not be stopped prior to calling this function or an error will be returned.
Parameters
[in]clock_sourceThe clock source to stop.

◆ init

ssp_err_t(* cgc_api_t::init) (void)

Initial configuration

Implemented as
Note
The BSP module calls this function at startup. No further initialization is necessary.

◆ lcdClockCfg

ssp_err_t(* cgc_api_t::lcdClockCfg) (cgc_clock_t clock)

Configure the segment LCD Clock (S3A7 and S124 only).

Implemented as
Parameters
[in]clockSegment LCD clock source.

◆ lcdClockDisable

ssp_err_t(* cgc_api_t::lcdClockDisable) (void)

Disables the LCD clock (S3A7 and S124 only).

Implemented as

◆ lcdClockEnable

ssp_err_t(* cgc_api_t::lcdClockEnable) (void)

Enable the LCD clock (S3A7 and S124 only).

Implemented as

◆ oscStopDetect

ssp_err_t(* cgc_api_t::oscStopDetect) (void(*p_callback)(cgc_callback_args_t *p_args), bool enable)

Configure the Main Oscillator stop detection.

Implemented as
Parameters
[in]p_callbackCallback function that will be called by the NMI interrupt when an oscillation stop is detected. If the second argument is "false", then this argument can be NULL.
[in]enableEnable/disable Oscillation Stop Detection.

◆ oscStopStatusClear

ssp_err_t(* cgc_api_t::oscStopStatusClear) (void)

Clear the oscillator stop detection flag.

Implemented as

◆ sdadcClockCfg

ssp_err_t(* cgc_api_t::sdadcClockCfg) (cgc_clock_t clock)

Configure the 24-bit Sigma-Delta A/D Converter Clock (S1JA only).

Implemented as
Parameters
[in]clockSDADC clock source.

◆ sdadcClockDisable

ssp_err_t(* cgc_api_t::sdadcClockDisable) (void)

Disables the SDADC clock (S1JA only).

Implemented as

◆ sdadcClockEnable

ssp_err_t(* cgc_api_t::sdadcClockEnable) (void)

Enable the SDADC clock (S1JA only).

Implemented as

◆ sdramClockOutDisable

ssp_err_t(* cgc_api_t::sdramClockOutDisable) (void)

Disables the SDRAM clock (S7G2 only).

Implemented as

◆ sdramClockOutEnable

ssp_err_t(* cgc_api_t::sdramClockOutEnable) (void)

Enables the SDRAM clock output (S7G2 only).

Implemented as

◆ systemClockFreqGet

ssp_err_t(* cgc_api_t::systemClockFreqGet) (cgc_system_clocks_t clock, uint32_t *p_freq_hz)

Return the frequency of the selected clock.

Implemented as
Parameters
[in]clockSpecifies the internal clock whose frequency is returned.
[out]p_freq_hzReturns the frequency in Hz referenced by this pointer.

◆ systemClockGet

ssp_err_t(* cgc_api_t::systemClockGet) (cgc_clock_t *p_clock_source, cgc_system_clock_cfg_t *p_set_clock_cfg)

Get the system clock information.

Implemented as
Parameters
[in]p_set_clock_cfgPointer to clock configuration structure
[out]clock_sourceReturns the current system clock.
[out]p_clock_cfgReturns the current system clock dividers.

◆ systemClockSet

ssp_err_t(* cgc_api_t::systemClockSet) (cgc_clock_t clock_source, cgc_system_clock_cfg_t const *const p_clock_cfg)

Set the system clock.

Implemented as
Precondition
The clock to be set as the system clock must be running prior to calling this function.
Parameters
[in]clock_sourceClock source to set as system clock
[in]p_clock_cfgPointer to the clock dividers configuration passed by the caller.

◆ systickUpdate

ssp_err_t(* cgc_api_t::systickUpdate) (uint32_t period_count, cgc_systick_period_units_t units)

Update the Systick timer.

Implemented as
Parameters
[in]period_countThe duration for the systick period.
[in]unitsThe units for the provided period.

◆ usbClockCfg

ssp_err_t(* cgc_api_t::usbClockCfg) (cgc_usb_clock_div_t divider)

Configures the USB clock (S7G2 only).

Implemented as
Parameters
[in]dividerThe divider of 3, 4 or 5, of the clock source.

◆ versionGet

ssp_err_t(* cgc_api_t::versionGet) (ssp_version_t *p_version)

Gets the CGC driver version.

Implemented as
Parameters
[out]p_versionCode and API version used.

The documentation for this struct was generated from the following file: