cbAppColdStart()
Explanation
cbAppColdStart(bool_t bStart)
is called first on bStart == FALSE
and then on bStart == TRUE
. The bStart == TRUE
clause is used to initialize the application.
This is where the important initialisation of the TWELITE NET (the sToCoNet_AppContext
structure) needs to be done. Some features can only be configured here.
User-defined event processing functions are registered with the ToCoNet_Event_Register_State_Machine
()
function.
At the end of this process, the ToCoNet_vMacStart()
function is called.
The start of the MAC layer is explicitly stated as a procedure in the API.
Arguments
Type | Name | Remark |
|
| It is called twice at startup, the first time as FALSE and the second time as TRUE. |
bStart
FALSE
: It is just after the start of microcomputer, and initialization of peripherals etc. has not been done. Call the ToCoNet_REG_MOD_ALL()
macro of module registration here.
TRUE
: TWELITE NET Called after the library and hardware APIs have been initialized, but before the library is initialized. The following procedure is described here.
Setting initial parameters for
sToCoNet_AppContext
structureResister a state machine by
ToCoNet_Event_Register_State_Machine()
Initialisation of the application's own memory area etc.
Hardware initialisation
Starts MAC layer by
ToCoNet_vMacStart()
Returns
None
Sample code
最終更新