46 #include <ti/devices/DeviceFamily.h> 47 #include DeviceFamily_constructPath(driverlib/aon_rtc.h) 48 #include DeviceFamily_constructPath(driverlib/cpu.h) 49 #include DeviceFamily_constructPath(driverlib/interrupt.h) 50 #include DeviceFamily_constructPath(driverlib/prcm.h) 51 #include DeviceFamily_constructPath(driverlib/timer.h) 53 #include <ti/drivers/dpl/ClockP.h> 54 #include <ti/drivers/dpl/HwiP.h> 55 #include <ti/drivers/power/PowerCC26XX.h> 57 static volatile clock_time_t count;
58 static ClockP_Struct etimer_clock;
63 const uintptr_t key = HwiP_disable();
73 static inline clock_time_t
76 clock_time_t count_read;
78 const uintptr_t key = HwiP_disable();
89 const uint32_t clockp_ticks_second =
90 (uint32_t)(1000 * 1000) / (
CLOCK_SECOND) / ClockP_getSystemTickPeriod();
95 ClockP_Params_init(¶ms);
97 params.period = clockp_ticks_second;
98 params.startFlag =
true;
100 ClockP_construct(&etimer_clock, (ClockP_Fxn)clock_update_cb,
101 clockp_ticks_second, ¶ms);
void clock_delay(unsigned int i)
Obsolete delay function but we implement it here since some code still uses it.
static bool start(void)
Start measurement.
void etimer_request_poll(void)
Make the event timer aware that the clock has changed.
clock_time_t clock_time(void)
Get the current clock time.
#define CLOCK_SECOND
A second, measured in system clock time.
void clock_wait(clock_time_t i)
Wait for a given number of ticks.
int etimer_pending(void)
Check if there are any non-expired event timers.
void clock_init(void)
Initialize the clock library.
unsigned long clock_seconds(void)
Get the current value of the platform seconds.
void clock_delay_usec(uint16_t usec)
Delay a given number of microseconds.