The whd Thread allows thread safe access to the whd hardware bus This is an whd internal file and should not be used by functions outside whd. More...
Go to the source code of this file.
Data Structures | |
struct | whd_thread_info |
Functions | |
whd_result_t | whd_thread_init (whd_driver_t whd_driver) |
Initialises the whd Thread. More... | |
void | whd_thread_quit (whd_driver_t whd_driver) |
Terminates the whd Thread. More... | |
The whd Thread allows thread safe access to the whd hardware bus This is an whd internal file and should not be used by functions outside whd.
This file provides prototypes for functions which allow multiple threads to use the whd hardware bus (SDIO or SPI) This is achieved by having a single thread (the "whd Thread") which queues messages to be sent, sending them sequentially, as well as receiving messages as they arrive.
Messages to be sent come from the whd_sdpcm_send_common function in whd_sdpcm.c . The messages already contain SDPCM headers, but not any bus headers (GSPI), and are passed via a queue This function can be called from any thread.
Messages are received by way of a callback supplied by in whd_sdpcm.c - whd_sdpcm_process_rx_packet Received messages are delivered in the context of the whd Thread, so the callback function needs to avoid blocking.
Definition in file whd_thread.h.
whd_result_t whd_thread_init | ( | whd_driver_t | whd_driver | ) |
Initialises the whd Thread.
Initialises the whd thread, and its flags/semaphores, then starts it running
void whd_thread_quit | ( | whd_driver_t | whd_driver | ) |
Terminates the whd Thread.
Sets a flag then wakes the whd Thread to force it to terminate.