51 #include "../core/tn_common.h"
59 #if defined(__PIC32MX__)
62 #error "unknown platform"
PIC32 architecture-dependent routines.
void _tn_arch_context_switch_pend(void)
Called whenever we need to switch context from one task to another.
TN_UWord * _tn_arch_stack_top_get(TN_UWord *stack_low_address, int stack_size)
Should return top of the stack, which may be either:
void tn_arch_int_en(void)
Unconditionally enable interrupts.
void tn_arch_int_dis(void)
Unconditionally disable interrupts.
TN_UWord * _tn_arch_stack_init(TN_TaskBody *task_func, TN_UWord *stack_top, void *param)
Should put initial CPU context to the provided stack pointer for new task and return current stack po...
int _tn_arch_inside_isr(void)
Should return 1 if ISR is currently running, 0 otherwise.
void( TN_TaskBody)(void *param)
Prototype for task body function.
TN_UWord tn_arch_sr_save_int_dis(void)
Disable interrupts and return previous value of status register, atomically.
void _tn_arch_context_switch_now_nosave(void)
Called whenever we need to switch context to new task, but don't save current context.
void tn_arch_sr_restore(TN_UWord sr)
Restore previously saved status register.
unsigned int TN_UWord
Unsigned integer type whose size is equal to the size of CPU register.