45 #include PLATFORM_HEADER
49 #include "dev/stm32w-systick.h"
52 #include "sys/clock.h"
58 #define DEBUG DEBUG_NONE
63 #define RELOAD_VALUE 24000-1
65 static volatile clock_time_t count;
66 static volatile unsigned long current_seconds = 0;
77 if(--second_countdown == 0) {
110 for(j = 50; j > 0; j--) {
125 while(
clock_time() - start < (clock_time_t) i);
131 return current_seconds;
void SysTick_SetReload(uint32_t Reload)
Sets SysTick Reload value.
void SysTick_CLKSourceConfig(uint32_t SysTick_CLKSource)
Configures the SysTick clock source.
STM32W radio driver header file
void clock_init(void)
Initialize the clock library.
CCIF clock_time_t clock_time(void)
Get the current clock time.
void SysTick_ITConfig(FunctionalState NewState)
Enables or disables the SysTick Interrupt.
void SysTick_CounterCmd(uint32_t SysTick_Counter)
Enables or disables the SysTick counter.
void etimer_request_poll(void)
Make the event timer aware that the clock has changed.
CCIF unsigned long clock_seconds(void)
Get the current value of the platform seconds.
int etimer_pending(void)
Check if there are any non-expired event timers.
Generic set of HAL includes for all platforms.
Return codes for API functions and module definitions.
void clock_delay(unsigned int delay)
Obsolete delay function but we implement it here since some code still uses it.
A set of debugging macros.
#define ATOMIC(blah)
A block of code may be made atomic by wrapping it with this macro.
void clock_wait(clock_time_t t)
Wait for a given number of ticks.
#define CLOCK_SECOND
A second, measured in system clock time.