1 /* 2 * Copyright 2023, 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 whd.h 19 * Provides abstract pointer type to act as instance for: driver, interface, buffer funcs, network funcs, resource funcs and bus funcs. 20 */ 21 22 #include "whd_types.h" 23 24 #ifndef INCLUDED_WHD_H 25 #define INCLUDED_WHD_H 26 27 #ifdef __cplusplus 28 extern "C" 29 { 30 #endif 31 32 /** 33 * Abstract pointer type that acts as a handle to an instance of the driver 34 */ 35 typedef struct whd_driver *whd_driver_t; 36 /** 37 * Abstract pointer type that acts as a handle to an instance of the bt base address 38 */ 39 typedef struct whd_bt_info *whd_bt_info_t; 40 /** 41 * Abstract pointer type that acts as a handle to an instance of the bt device 42 */ 43 typedef struct whd_bt_dev *whd_bt_dev_t; 44 /** 45 * Abstract pointer type to handle instance of whd interface 46 */ 47 typedef struct whd_interface *whd_interface_t; 48 49 /** 50 * Abstract type that acts as a handle to an instance of a buffer function 51 */ 52 typedef struct whd_buffer_funcs whd_buffer_funcs_t; 53 54 /** 55 * Abstract type that acts as a handle to an instance of a network interface function 56 */ 57 typedef struct whd_netif_funcs whd_netif_funcs_t; 58 59 /** 60 * Abstract type that acts as a handle to an instance of a resource function 61 */ 62 typedef struct whd_resource_source whd_resource_source_t; 63 64 /** 65 * Abstract type that acts as a handle to an instance of a bus function used for SDIO specific functionality 66 */ 67 typedef struct whd_bus_funcs whd_sdio_funcs_t; 68 69 /** 70 * Abstract type that acts as a handle to an instance of a bus function used for SPI specific functionality 71 */ 72 typedef struct whd_bus_funcs whd_spi_funcs_t; 73 74 /** 75 * Structure for storing WHD init configurations 76 */ 77 typedef struct whd_init_config 78 { 79 void *thread_stack_start; /**< Pointer to the WHD thread stack */ 80 uint32_t thread_stack_size; /**< Size of the WHD thread stack */ 81 uint32_t thread_priority; /**< Priority to be set to WHD Thread */ 82 whd_country_code_t country; /**< Variable to strore country code information */ 83 } whd_init_config_t; 84 85 #ifdef __cplusplus 86 } /* extern "C" */ 87 #endif 88 #endif /* INCLUDED_WHD_H */ 89 90