22 #include <hal_freertos/interrupts.h>
23 #include <hal_freertos/tick_timer.h>
26 #if (configSUPPORT_STATIC_ALLOCATION == 0)
27 #error FreeRTOS static allocation must be enabled for SatCat5.
29 #if (configUSE_TICK_HOOK == 0)
30 #error The FreeRTOS tick hook must be enabled for SatCat5.
33 #ifndef portYIELD_FROM_ISR
34 #define portYIELD_FROM_ISR(x) portEND_SWITCHING_ISR(x)
42 template <configSTACK_DEPTH_TYPE TASK_SIZE,
unsigned TASK_PRIORITY>
67 BaseType_t yield_flag = pdFALSE;
69 portYIELD_FROM_ISR(yield_flag);
75 const char* task_name,
76 TaskFunction_t task_function,
77 void *
const task_params = NULL)
105 template <configSTACK_DEPTH_TYPE TASK_SIZE,
unsigned TASK_PRIORITY>
125 static void task(
void* pvParams)
134 "FreeRTOS with SatCat5!\r\n\t"
139 satcat5::poll::service_all();
const char * get_sw_build_string()
Return a pointer to the ISO8601 date and time constructed at build time.
FreeRTOS implementation of the "InterruptController" class.
void irq_start(satcat5::util::TimeRef *timer=0)
Initialize FreeRTOS controller and start SatCat5 interrupts.
Instantiate a FreeRTOS statically-allocated Task that services the SatCat5 core loop.
static void task(void *pvParams)
Core task entry function, performs setup then calls poll::service_all() on a loop.
TickTimer * m_tick_timer
Reference Timer.
ControllerFreeRTOS * m_irq_controller
Interrupt Controller.
Instantiate a FreeRTOS statically-allocated Task.
void resume_from_isr(void)
Resumes suspended task (should be called from ISR)
void resume(void)
Resumes suspended task.
void notify(void)
Notify Task.
TaskHandle_t m_task_handle
Task Handle.
StackType_t m_stack[TASK_SIZE]
Task Stack.
StaticTask_t m_static_task
Task internals.
void suspend(void)
Suspends running task.
void notify_from_isr(void)
Notify Task (should be called from ISR)
TaskHandle_t get_task_handle(void)
Returns task handle of created task.
SatCat5 time reference using the FreeRTOS tick counter.
The Log class creates and formats one log message.
Log & write(const char *str)
Formatting methods for various data types.
void set_clock(satcat5::util::TimeRef *timer)
Immediately set the system time reference.
Diagnostic logging to UART and/or Ethernet ports.
Core event-processing loop for SatCat5 software.
Provides a FreeRTOS task function and hooks for using SatCat5 as a task inside a larger FreeRTOS proj...
TaskHandle_t satcat_task_handle
Task handle, must be outside StaticTask for access by vApplicationTickHook()