1.4.3.19 PAL_CallbackRegister Function
C
void PAL_CallbackRegister(PAL_CALLBACKS *pCallbacks);
Summary
Sets PAL layer callback functions.
Description
This routine links callback functions between upper layer and phy layer.
Precondition
The PAL_Initialize function should have been called before calling this function.
Parameters
| Param | Description |
|---|---|
| pCallbacks | Callbacks structure |
Returns
None.
Example
static void _data_confirm_handler(PAL_MSG_CONFIRM_DATA *dataConfirm)
{
...
}
void main(void)
{
PAL_CALLBACKS pal_cbs;
PAL_Initialize();
memset(palCBs, NULL, sizeof(palCBs));
palCBs.palDataConfirm = _data_confirm_handler;
PAL_SetCallbacks(&palCBs);
}
Remarks
None
