5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
wwd_poll.h File Reference

Functions

int8_t wwd_thread_poll_all (void)
 
int8_t wwd_thread_receive_one_packet (void)
 
int8_t wwd_thread_send_one_packet (void)
 

Detailed Description

Header for using WWD with no RTOS or network stack

It is possible to use these WWD without any operating system. To do this, the user application is required to periodically use the functions in this file to allow WWD to send and receive data across the SPI/SDIO bus.

Function Documentation

◆ wwd_thread_poll_all()

int8_t wwd_thread_poll_all ( void )
extern

Sends and Receives all waiting packets

Repeatedly calls wwd_thread_send_one_packet and wwd_thread_receive_one_packet to send and receive packets, until there are no more packets waiting to be transferred.

This function is normally used by the WWD Thread, but can be called periodically by systems which have no RTOS to ensure packets get send and received properly.

Returns
1 : packet was sent or received 0 : no packet was sent or received

Sends and Receives all waiting packets

Calls wwd_thread_send_one_packet and wwd_thread_receive_one_packet once to send and receive packets, until there are no more packets waiting to be transferred.

This function is normally used by the WWD Thread, but can be called periodically by systems which have no RTOS to ensure packets get send and received properly.

Note: do not loop in here, to avoid overwriting previously rx-ed packets

◆ wwd_thread_receive_one_packet()

int8_t wwd_thread_receive_one_packet ( void )
extern

Receives a packet if one is waiting

Checks the wifi chip fifo to determine if there is any packets waiting to be received. If there are, then it receives the first one, and calls the callback wwd_sdpcm_process_rx_packet (in wwd_sdpcm.c).

This function is normally used by the WWD Thread, but can be called periodically by systems which have no RTOS to ensure packets get received properly.

Returns
1 : packet was received 0 : no packet waiting

◆ wwd_thread_send_one_packet()

int8_t wwd_thread_send_one_packet ( void )
extern

Sends the first queued packet

Checks the queue to determine if there is any packets waiting to be sent. If there are, then it sends the first one.

This function is normally used by the WWD Thread, but can be called periodically by systems which have no RTOS to ensure packets get sent.

Returns
1 : packet was sent 0 : no packet sent