51 #include "../core/tn_common.h"
59 #if defined(__TN_ARCH_PIC32MX__)
61 #elif defined(__TN_ARCH_PIC24_DSPIC__)
64 # error "unknown platform"
120 unsigned int int_stack_size
TN_UWord * _tn_arch_stack_init(TN_TaskBody *task_func, TN_UWord *stack_top, int stack_size, void *param)
Should put initial CPU context to the provided stack pointer for new task and return current stack po...
PIC32 architecture-dependent routines.
int _tn_arch_is_int_disabled(void)
Should return 1 if system interrupts are currently disabled, 0 otherwise.
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:
void tn_arch_int_en(void)
Unconditionally enable interrupts.
void tn_arch_int_dis(void)
Unconditionally disable system interrupts.
PIC24/dsPIC architecture-dependent routines.
int _tn_arch_inside_isr(void)
Should return 1 if system 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 system 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.
void _tn_arch_sys_init(TN_UWord *int_stack, unsigned int int_stack_size)
Architecture-dependent system startup routine.