ke_state_set: Set the state of the task identified by its Task Id. In this function we also handle the SAVE service: when a task state changes we try to activate all the messages currently saved in the save queue for the given task identifier.
ke_msg_send_basic: If the message has no parameters, the ke_msg_send_basic() function can be used. Send a message that has a zero length parameter member. No allocation is required as it will be done internally.
Both of them can be used as shown in the bass_task.c for instance:
/// Specifies the message handler structure for every input state. const struct ke_state_handler bass_state_handler[BASS_STATE_MAX] = { [BASS_DISABLED] = KE_STATE_HANDLER(bass_disabled), [BASS_IDLE] = KE_STATE_HANDLER(bass_idle), [BASS_CONNECTED] = KE_STATE_HANDLER(bass_connected), };
Also can app_timer_set still be used in deep sleep?
Hi,
ke_state_set:
Set the state of the task identified by its Task Id.
In this function we also handle the SAVE service: when a task state changes we try to activate all the messages currently saved in the save queue for the given task identifier.
ke_msg_send_basic:
If the message has no parameters, the ke_msg_send_basic() function can be used.
Send a message that has a zero length parameter member. No allocation is required as it will be done internally.
Both of them can be used as shown in the bass_task.c for instance:
/// Specifies the message handler structure for every input state.
const struct ke_state_handler bass_state_handler[BASS_STATE_MAX] =
{
[BASS_DISABLED] = KE_STATE_HANDLER(bass_disabled),
[BASS_IDLE] = KE_STATE_HANDLER(bass_idle),
[BASS_CONNECTED] = KE_STATE_HANDLER(bass_connected),
};
/// Idle State handler definition.
const struct ke_msg_handler bass_idle[] =
{
{BASS_ENABLE_REQ, (ke_msg_func_t) bass_enable_req_handler}
};
Yes, the app_timer_set can be used while the DA14580 is in extended/deep sleep modes.
For more info, please see:http://support.dialog-semiconductor.com/system/files/restricted/UM-B-006...
regards,.
DIALOG SUPPORT TEAM.