-
Notifications
You must be signed in to change notification settings - Fork 46
nOS_Start
Simon Benoit edited this page May 26, 2018
·
5 revisions
nOS_Error nOS_Start (void);
Unlock context switching, call user callback and do first scheduling.
Parameter | Description |
---|
Return | Description |
---|---|
NOS_OK | Kernel started successfully. |
NOS_E_RUNNING | Kernel already started. |
- It is suggested to start your systick timer in callback.
- User callback is called outside of critical section, then interrupts can be re-enabled in callback.
#include "nOS.h"
void main(void)
{
disable_interrupts();
nOS_Init();
// Application specific init
// nOS objects creation
nOS_Start();
enable_interrupts();
// ...
while (1) {
// Idle
// ...
}
}