ke_msg_send_basic and ke_state_set

3 posts / 0 new
Last post
fidelity1234
Offline
Last seen:5 years 7 months ago
Joined:2014-07-30 11:32
ke_msg_send_basic and ke_state_set

What is the difference between ke_msg_send_basic and ke_state_set?
How should ke_msg_send_basic and ke_state_set be used?

Many THanks,
Aaron

fidelity1234
Offline
Last seen:5 years 7 months ago
Joined:2014-07-30 11:32
Also can app_timer_set still

Also can app_timer_set still be used in deep sleep?

gl_dialog
Offline
Last seen:3 years 2 months ago
Staff
Joined:2014-02-07 13:35
Hi,

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.