Hi
I had implemented a program using the dialog part 14583 and in this program I had created three additional tasks. This was using the SDK 5.0.3
For each task I had assigned an ID like
ke_task_id_t MAIN_TASK = TASK_MAX + 3;
and then created the task using
// Create the task ke_task_create(MAIN_TASK, &TASK_DESC_MAIN);
Now I wish to port this program to the 14586 using the SDK 6.0.10 and am having problems creating custom tasks and sending messages in between it.
In the SDK file "DA14585_SDK_6.0.10.511_0\DA14585_SDK\6.0.10.511\sdk\platform\core_modules\rwip\api\rwip_config.h" there are now two types of structures for task ids, the KE_TASK_TYPE and KE_API_ID and the scheme for identifying a task has also changed.
Can you please let me know if there is any example of creating a custom Task, and if there is not, then how do I implement a custom task.
Hi mutahir,
We unfortunately do not have a great example available that demonstrates the implementation of custom tasks, but you may be able to learn from how we have implemented the custom services in our barebones BLE project.
那就是说,我想知道为什么哟u are using custom tasks in the first place. It is much easier to implement all of your user code in the already supported user task, so unless you have reasons to prioritize some processes over others, the most efficient and easiest way is to keep all within the usertask. Task switching comes at a price within any kernel, and the Dialog kernel is no different.
/MHv
Hi Hutahir,
The 1st parameter of ke_task_create() is task type, which is uint8_t format. If you want to find a example to call this function, could refer app.c in SDK.