whd.h 2.6 KB

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