Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Functions
whd_thread.h File Reference

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...

#include "cyabs_rtos.h"
#include "whd.h"

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...
 

Detailed Description

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.

Function Documentation

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

Returns
whd result code
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.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.