33 #if defined(PIOS_INCLUDE_RTC)
38 void (*
fn)(uintptr_t);
42 #define PIOS_RTC_MAX_CALLBACKS 10
44 static volatile uint32_t rtc_counter;
45 static int rtc_callback_next;
77 static void rtc_do(
void)
82 for (uint8_t
i = 0;
i < rtc_callback_next;
i++) {
90 static void PIOS_RTC_Task(
void *
unused)
uint32_t PIOS_Thread_Systime(void)
Main PiOS header to include all the compiled in PiOS options.
uint32_t PIOS_RTC_Counter()
bool PIOS_RTC_RegisterTickCallback(void(*fn)(uintptr_t id), uintptr_t data)
uint8_t data[XFER_BYTES_PER_PACKET]
static struct rtc_callback_entry rtc_callback_list[PIOS_RTC_MAX_CALLBACKS]
float PIOS_RTC_MsPerTick()
#define PIOS_THREAD_STACK_SIZE_MIN
struct pios_thread * PIOS_Thread_Create(void(*fp)(void *), const char *namep, size_t stack_bytes, void *argp, enum pios_thread_prio_e prio)
void PIOS_RTC_Init(const struct pios_rtc_cfg *cfg)
void PIOS_Thread_Sleep_Until(uint32_t *previous_ms, uint32_t increment_ms)
#define PIOS_RTC_MAX_CALLBACKS
#define PIOS_Assert(test)