Mistake on this page?
Report an issue in GitHub or email us
whd_bus.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 Cypress Semiconductor Corporation
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  *
20  */
21 
22 #include "whd_bus_protocol_interface.h"
23 
24 #ifndef INCLUDED_WHD_BUS_H_
25 #define INCLUDED_WHD_BUS_H_
26 
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
32 #if 0
33 typedef struct whd_bus_if *whd_bus_if_t;
34 
35 typedef whd_result_t (*whd_bus_transfer_t)(whd_bus_if_t *bus_if, whd_bus_transfer_direction_t dir,
36  uint8_t *data, uint16_t data_size, void *arg1, void *arg2, void *arg3,
37  void *arg4);
38 #endif
39 
40 typedef whd_result_t (*whd_bus_init_t)(whd_driver_t whd_driver);
41 typedef whd_result_t (*whd_bus_deinit_t)(whd_driver_t whd_driver);
42 
43 typedef whd_result_t (*whd_bus_ack_interrupt_t)(whd_driver_t whd_driver, uint32_t intstatus);
44 typedef whd_bool_t (*whd_bus_wake_interrupt_present_t)(whd_driver_t whd_driver);
45 typedef uint32_t (*whd_bus_packet_available_to_read_t)(whd_driver_t whd_driver);
46 typedef whd_result_t (*whd_bus_read_frame_t)(whd_driver_t whd_driver, whd_buffer_t *buffer);
47 
48 typedef whd_result_t (*whd_bus_write_backplane_value_t)(whd_driver_t whd_driver, uint32_t address,
49  uint8_t register_length, uint32_t value);
50 typedef whd_result_t (*whd_bus_read_backplane_value_t)(whd_driver_t whd_driver, uint32_t address,
51  uint8_t register_length, uint8_t *value);
52 
53 typedef whd_result_t (*whd_bus_write_register_value_t)(whd_driver_t whd_driver, whd_bus_function_t function,
54  uint32_t address, uint8_t value_length, uint32_t value);
55 typedef whd_result_t (*whd_bus_read_register_value_t)(whd_driver_t whd_driver, whd_bus_function_t function,
56  uint32_t address, uint8_t value_length, uint8_t *value);
57 
58 typedef whd_result_t (*whd_bus_transfer_bytes_t)(whd_driver_t whd_driver, whd_bus_transfer_direction_t direction,
59  whd_bus_function_t function, uint32_t address, uint16_t size,
61 
62 typedef whd_result_t (*whd_bus_poke_wlan_t)(whd_driver_t whd_driver);
63 
64 typedef whd_result_t (*whd_bus_wakeup_t)(whd_driver_t whd_driver);
65 typedef whd_result_t (*whd_bus_sleep_t)(whd_driver_t whd_driver);
66 typedef uint8_t (*whd_bus_backplane_read_padd_size_t)(whd_driver_t whd_driver);
67 typedef whd_result_t (*whd_bus_send_buffer_t)(whd_driver_t whd_driver, whd_buffer_t buffer);
68 typedef whd_result_t (*whd_bus_wait_for_wlan_event_t)(whd_driver_t whd_driver,
69  cy_semaphore_t *transceive_semaphore);
70 typedef whd_bool_t (*whd_bus_use_status_report_scheme_t)(whd_driver_t whd_driver);
71 typedef uint32_t (*whd_bus_get_max_transfer_size_t)(whd_driver_t whd_driver);
72 
73 typedef void (*whd_bus_init_stats_t)(whd_driver_t whd_driver);
74 typedef whd_result_t (*whd_bus_print_stats_t)(whd_driver_t whd_driver, whd_bool_t reset_after_print);
75 typedef whd_result_t (*whd_bus_reinit_stats_t)(whd_driver_t whd_driver, whd_bool_t wake_from_firmware);
76 typedef whd_result_t (*whd_bus_irq_register_t)(whd_driver_t whd_driver);
77 typedef whd_result_t (*whd_bus_irq_enable_t)(whd_driver_t whd_driver, whd_bool_t enable);
78 
79 typedef struct whd_bus_info
80 {
81  whd_bus_init_t whd_bus_init_fptr;
82  whd_bus_deinit_t whd_bus_deinit_fptr;
83 
84  whd_bus_ack_interrupt_t whd_bus_ack_interrupt_fptr;
85  whd_bus_send_buffer_t whd_bus_send_buffer_fptr;
86 
87  whd_bus_wake_interrupt_present_t whd_bus_wake_interrupt_present_fptr;
88  whd_bus_packet_available_to_read_t whd_bus_packet_available_to_read_fptr;
89  whd_bus_read_frame_t whd_bus_read_frame_fptr;
90 
91  whd_bus_write_backplane_value_t whd_bus_write_backplane_value_fptr;
92  whd_bus_read_backplane_value_t whd_bus_read_backplane_value_fptr;
93 
94  whd_bus_write_register_value_t whd_bus_write_register_value_fptr;
95  whd_bus_read_register_value_t whd_bus_read_register_value_fptr;
96 
97  whd_bus_transfer_bytes_t whd_bus_transfer_bytes_fptr;
98 
99  whd_bus_poke_wlan_t whd_bus_poke_wlan_fptr;
100 
101  whd_bus_wakeup_t whd_bus_wakeup_fptr;
102  whd_bus_sleep_t whd_bus_sleep_fptr;
103 
104  whd_bus_backplane_read_padd_size_t whd_bus_backplane_read_padd_size_fptr;
105 
106  whd_bus_wait_for_wlan_event_t whd_bus_wait_for_wlan_event_fptr;
107  whd_bus_use_status_report_scheme_t whd_bus_use_status_report_scheme_fptr;
108 
109  whd_bus_get_max_transfer_size_t whd_bus_get_max_transfer_size_fptr;
110 
111  whd_bus_init_stats_t whd_bus_init_stats_fptr;
112  whd_bus_print_stats_t whd_bus_print_stats_fptr;
113  whd_bus_reinit_stats_t whd_bus_reinit_stats_fptr;
114  whd_bus_irq_register_t whd_bus_irq_register_fptr;
115  whd_bus_irq_enable_t whd_bus_irq_enable_fptr;
117 
118 
119 #ifdef __cplusplus
120 } /* extern "C" */
121 #endif
122 #endif /* ifndef INCLUDED_WHD_BUS_H_ */
123 
whd_bus_transfer_direction_t
Transfer direction for the WHD platform bus interface.
Definition: whd_types.h:172
whd_bool_t
Boolean values.
Definition: whd_types.h:162
uint32_t whd_result_t
WHD result is specified as uint32_t value.
Definition: whd_types.h:776
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.