I am having a look to the generic_list.c in order to reuse the code for my own lists.
The serial_manager is using it for the SERIAL_MANAGER_NON_BLOCKING_MODE.
Nevertheless I can not see how can it work:
When adding elements to the list, we are passing the address of "link", which is type "list_element_t"
static void SerialManager_AddTail(list_t *queue, serial_manager_write_handle_t *node)
But when retrieving the element from the list
serial_manager_write_handle_t *writeHandle =
What we get from the list is a "list_element_t" (the "&node->link" previously added), the casting to "serial_manager_write_handle_t" does not work.
Am I missing something?
PS: I am using SDK 2.7.0 on a MK26