![]() |
Synergy Software Package User's Manual
|
#include <r_cgc_api.h>
CGC functions implemented at the HAL layer follow this API.
| 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).
| [in] | divider | The divider of 1 or 2 of the clock source. |
| ssp_err_t(* cgc_api_t::busClockOutDisable) (void) |
Disable the bus clock output (S7G2 and S3A7 only).
| ssp_err_t(* cgc_api_t::busClockOutEnable) (void) |
Enable the bus clock output (S7G2 and S3A7 only).
| ssp_err_t(* cgc_api_t::clockCheck) (cgc_clock_t clock_source) |
Check the stability of the selected clock.
| [in] | clock_source | Which clock source to check for stability. |
| ssp_err_t(* cgc_api_t::clockOutCfg) (cgc_clock_t clock, cgc_clockout_dividers_t divider) |
Configure clockOut.
| [in] | clock | Clock source. |
| [in] | divider | Divider of between 1 and 128 of the clock source. |
| 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.
| 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.
| ssp_err_t(* cgc_api_t::clocksCfg) (cgc_clocks_cfg_t const *const p_clock_cfg) |
Configure all system clocks.
| [in] | p_clock_cfg | Pointer to a structure that contains the dividers or multipliers to be used when configuring the PLL. |
| ssp_err_t(* cgc_api_t::clockStart) (cgc_clock_t clock_source, cgc_clock_cfg_t *p_clock_cfg) |
Start a clock.
| [in] | clock_source | Clock source to initialize. |
| [in] | p_clock_cfg | Pointer to a structure that contains the dividers or multipliers to be used when configuring the PLL. |
| ssp_err_t(* cgc_api_t::clockStop) (cgc_clock_t clock_source) |
Stop a clock.
| [in] | clock_source | The clock source to stop. |
| ssp_err_t(* cgc_api_t::init) (void) |
Initial configuration
| ssp_err_t(* cgc_api_t::lcdClockCfg) (cgc_clock_t clock) |
Configure the segment LCD Clock (S3A7 and S124 only).
| [in] | clock | Segment LCD clock source. |
| ssp_err_t(* cgc_api_t::lcdClockDisable) (void) |
Disables the LCD clock (S3A7 and S124 only).
| ssp_err_t(* cgc_api_t::lcdClockEnable) (void) |
Enable the LCD clock (S3A7 and S124 only).
| ssp_err_t(* cgc_api_t::oscStopDetect) (void(*p_callback)(cgc_callback_args_t *p_args), bool enable) |
Configure the Main Oscillator stop detection.
| [in] | p_callback | Callback 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] | enable | Enable/disable Oscillation Stop Detection. |
| ssp_err_t(* cgc_api_t::oscStopStatusClear) (void) |
Clear the oscillator stop detection flag.
| ssp_err_t(* cgc_api_t::sdadcClockCfg) (cgc_clock_t clock) |
Configure the 24-bit Sigma-Delta A/D Converter Clock (S1JA only).
| [in] | clock | SDADC clock source. |
| ssp_err_t(* cgc_api_t::sdadcClockDisable) (void) |
Disables the SDADC clock (S1JA only).
| ssp_err_t(* cgc_api_t::sdadcClockEnable) (void) |
Enable the SDADC clock (S1JA only).
| ssp_err_t(* cgc_api_t::sdramClockOutDisable) (void) |
Disables the SDRAM clock (S7G2 only).
| ssp_err_t(* cgc_api_t::sdramClockOutEnable) (void) |
Enables the SDRAM clock output (S7G2 only).
| ssp_err_t(* cgc_api_t::systemClockFreqGet) (cgc_system_clocks_t clock, uint32_t *p_freq_hz) |
Return the frequency of the selected clock.
| [in] | clock | Specifies the internal clock whose frequency is returned. |
| [out] | p_freq_hz | Returns the frequency in Hz referenced by this pointer. |
| 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.
| [in] | p_set_clock_cfg | Pointer to clock configuration structure |
| [out] | clock_source | Returns the current system clock. |
| [out] | p_clock_cfg | Returns the current system clock dividers. |
| 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.
| [in] | clock_source | Clock source to set as system clock |
| [in] | p_clock_cfg | Pointer to the clock dividers configuration passed by the caller. |
| ssp_err_t(* cgc_api_t::systickUpdate) (uint32_t period_count, cgc_systick_period_units_t units) |
Update the Systick timer.
| [in] | period_count | The duration for the systick period. |
| [in] | units | The units for the provided period. |
| ssp_err_t(* cgc_api_t::usbClockCfg) (cgc_usb_clock_div_t divider) |
Configures the USB clock (S7G2 only).
| [in] | divider | The divider of 3, 4 or 5, of the clock source. |
| ssp_err_t(* cgc_api_t::versionGet) (ssp_version_t *p_version) |
Gets the CGC driver version.
| [out] | p_version | Code and API version used. |