Mistake on this page?
Report an issue in GitHub or email us
whd_poll.h
Go to the documentation of this file.
1 /*
2  * Copyright 2021, Cypress Semiconductor Corporation (an Infineon company)
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /** @file
19  * Header for using WHD with no RTOS or network stack
20  *
21  * It is possible to use these WHD without any operating system. To do this,
22  * the user application is required to periodically use the functions in this
23  * file to allow WHD to send and receive data across the SPI/SDIO bus.
24  *
25  */
26 
27 #include "whd.h"
28 
29 #ifndef INCLUDED_WHD_POLL_H
30 #define INCLUDED_WHD_POLL_H
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
37 /******************************************************
38 * Function declarations
39 ******************************************************/
40 
41 
42 /** Sends the first queued packet
43  *
44  * Checks the queue to determine if there is any packets waiting
45  * to be sent. If there are, then it sends the first one.
46  *
47  * This function is normally used by the WHD Thread, but can be
48  * called periodically by systems which have no RTOS to ensure
49  * packets get sent.
50  *
51  * @return 1 : packet was sent
52  * 0 : no packet sent
53  */
55 
56 
57 /** Receives a packet if one is waiting
58  *
59  * Checks the wifi chip fifo to determine if there is any packets waiting
60  * to be received. If there are, then it receives the first one, and calls
61  * the callback @ref whd_sdpcm_process_rx_packet (in whd_sdpcm.c).
62  *
63  * This function is normally used by the WHD Thread, but can be
64  * called periodically by systems which have no RTOS to ensure
65  * packets get received properly.
66  *
67  * @return 1 : packet was received
68  * 0 : no packet waiting
69  */
71 
72 
73 /** Sends and Receives all waiting packets
74  *
75  * Repeatedly calls whd_thread_send_one_packet and whd_thread_receive_one_packet
76  * to send and receive packets, until there are no more packets waiting to
77  * be transferred.
78  *
79  * This function is normally used by the WHD Thread, but can be
80  * called periodically by systems which have no RTOS to ensure
81  * packets get send and received properly.
82  *
83  * @return 1 : packet was sent or received
84  * 0 : no packet was sent or received
85  */
87 
88 
89 #ifdef __cplusplus
90 } /* extern "C" */
91 #endif
92 #endif /* ifndef INCLUDED_WHD_POLL_H */
93 
Provides abstract pointer type to act as instance for: driver, interface, buffer funcs, network funcs, resource funcs and bus funcs.
int8_t whd_thread_send_one_packet(whd_driver_t whd_driver)
Sends the first queued packet.
int8_t whd_thread_poll_all(whd_driver_t whd_driver)
Sends and Receives all waiting packets.
int8_t whd_thread_receive_one_packet(whd_driver_t whd_driver)
Receives a packet if one is waiting.
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.