Miscellaneous

Miscellaneous system functions. More...

Macros

#define ZOS_RTOS_DEFINE_ISR(function)
 This macro allows for an interrupt callback to use RTOS structures such as semaphores and event flags.
 

Functions

zos_result_t zn_system_reboot (void)
 Reboot the module. More...
 
void zn_system_register_irq_callback (zos_platform_irq_t irq, void(*callback)(void))
 Register an interrupt callback. More...
 
void zn_system_register_system_tick_callback (void(*callback)(void))
 Register a system tick callback. More...
 

Detailed Description

Miscellaneous system functions.

Function Documentation

zos_result_t zn_system_reboot ( void  )

Reboot the module.

See ZentriOS Command API documentation: reboot.

void zn_system_register_irq_callback ( zos_platform_irq_t  irq,
void(*)(void)  callback 
)

Register an interrupt callback.

This registers an interrupt handler for the specificied interrupt vector.

The corresponding interrupt must be enabled using the appropriate MCU registers before the callback is triggered.

Note
Extreme care should be taken when registering an irq callback. The stability of the OS cannot be guaranteed with this is used.
void zn_system_register_system_tick_callback ( void(*)(void)  callback)

Register a system tick callback.

Register a callback to be called every system tick = 1 millisecond.

Note
The callback MUST be extremely simple as the system tick is used by the RTOS scheduler.