Functions | |
void | Cy_SysTick_Init (cy_en_systick_clock_source_t clockSource, uint32_t interval) |
Initializes the SysTick driver: More... | |
void | Cy_SysTick_Enable (void) |
Enables the SysTick timer and its interrupt. More... | |
void | Cy_SysTick_Disable (void) |
Disables the SysTick timer and its interrupt. More... | |
Cy_SysTick_Callback | Cy_SysTick_SetCallback (uint32_t number, Cy_SysTick_Callback function) |
Sets the callback function to the specified callback number. More... | |
Cy_SysTick_Callback | Cy_SysTick_GetCallback (uint32_t number) |
Gets the specified callback function address. More... | |
void | Cy_SysTick_SetClockSource (cy_en_systick_clock_source_t clockSource) |
Sets the clock source for the SysTick counter. More... | |
cy_en_systick_clock_source_t | Cy_SysTick_GetClockSource (void) |
Gets the clock source for the SysTick counter. More... | |
__STATIC_INLINE void | Cy_SysTick_EnableInterrupt (void) |
Enables the SysTick interrupt. More... | |
__STATIC_INLINE void | Cy_SysTick_DisableInterrupt (void) |
Disables the SysTick interrupt. More... | |
__STATIC_INLINE void | Cy_SysTick_SetReload (uint32_t value) |
Sets the value the counter is set to on a startup and after it reaches zero. More... | |
__STATIC_INLINE uint32_t | Cy_SysTick_GetReload (void) |
Gets the value the counter is set to on a startup and after it reaches zero. More... | |
__STATIC_INLINE uint32_t | Cy_SysTick_GetValue (void) |
Gets the current SysTick counter value. More... | |
__STATIC_INLINE uint32_t | Cy_SysTick_GetCountFlag (void) |
Gets the values of the count flag. More... | |
__STATIC_INLINE void | Cy_SysTick_Clear (void) |
Clears the SysTick counter for a well-defined startup. | |
void Cy_SysTick_Init | ( | cy_en_systick_clock_source_t | clockSource, |
uint32_t | interval | ||
) |
Initializes the SysTick driver:
clockSource | The SysTick clock source cy_en_systick_clock_source_t |
interval | The SysTick reload value. |
void Cy_SysTick_Enable | ( | void | ) |
Enables the SysTick timer and its interrupt.
void Cy_SysTick_Disable | ( | void | ) |
Disables the SysTick timer and its interrupt.
Cy_SysTick_Callback Cy_SysTick_SetCallback | ( | uint32_t | number, |
Cy_SysTick_Callback | function | ||
) |
Sets the callback function to the specified callback number.
number | The number of the callback function addresses to be set. The valid range is from 0 to CY_SYS_SYST_NUM_OF_CALLBACKS - 1. |
function | The pointer to the function that will be associated with the SysTick ISR for the specified number. |
Cy_SysTick_Callback Cy_SysTick_GetCallback | ( | uint32_t | number | ) |
Gets the specified callback function address.
number | The number of the callback function address to get. The valid range is from 0 to CY_SYS_SYST_NUM_OF_CALLBACKS - 1. |
void Cy_SysTick_SetClockSource | ( | cy_en_systick_clock_source_t | clockSource | ) |
Sets the clock source for the SysTick counter.
Clears the SysTick count flag if it was set. If the clock source is not ready this function call will have no effect. After changing the clock source to the low frequency clock, the counter and reload register values will remain unchanged so the time to the interrupt will be significantly longer and vice versa.
Changing the SysTick clock source and/or its frequency will change the interrupt interval and Cy_SysTick_SetReload() should be called to compensate this change.
clockSource | cy_en_systick_clock_source_t Clock source. For the PSoC 64 devices, passing any other value than CY_SYSTICK_CLOCK_SOURCE_CLK_CPU will not affect clock source and it will be as Cy_SysTick_GetClockSource() reports. |
cy_en_systick_clock_source_t Cy_SysTick_GetClockSource | ( | void | ) |
Gets the clock source for the SysTick counter.
__STATIC_INLINE void Cy_SysTick_EnableInterrupt | ( | void | ) |
Enables the SysTick interrupt.
__STATIC_INLINE void Cy_SysTick_DisableInterrupt | ( | void | ) |
Disables the SysTick interrupt.
__STATIC_INLINE void Cy_SysTick_SetReload | ( | uint32_t | value | ) |
Sets the value the counter is set to on a startup and after it reaches zero.
This function does not change or reset the current sysTick counter value, so it should be cleared using the Cy_SysTick_Clear() API.
value | The valid range is [0x0-0x00FFFFFF]. The counter reset value. |
__STATIC_INLINE uint32_t Cy_SysTick_GetReload | ( | void | ) |
Gets the value the counter is set to on a startup and after it reaches zero.
__STATIC_INLINE uint32_t Cy_SysTick_GetValue | ( | void | ) |
Gets the current SysTick counter value.
__STATIC_INLINE uint32_t Cy_SysTick_GetCountFlag | ( | void | ) |
Gets the values of the count flag.
The count flag is set once the SysTick counter reaches zero. The flag is cleared on read.