1 /** 2 * Copyright (c) 2017 IpTronix 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_NM_BSP_INTERNAL_H_ 8 #define ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_NM_BSP_INTERNAL_H_ 9 10 #include <zephyr/device.h> 11 #include <zephyr/drivers/gpio.h> 12 #include <zephyr/drivers/spi.h> 13 14 #include "wifi_winc1500_config.h" 15 #include <bus_wrapper/include/nm_bus_wrapper.h> 16 17 extern tstrNmBusCapabilities egstrNmBusCapabilities; 18 19 #if defined(CONFIG_WINC1500_DRV_USE_OLD_SPI_SW) 20 #define USE_OLD_SPI_SW 21 #endif /*CONFIG_WINC1500_DRV_USE_OLD_SPI_SW*/ 22 23 #define NM_EDGE_INTERRUPT (1) 24 25 #define NM_DEBUG CONF_WINC_DEBUG 26 #define NM_BSP_PRINTF CONF_WINC_PRINTF 27 28 enum winc1500_gpio_index { 29 WINC1500_GPIO_IDX_CHIP_EN = 0, 30 WINC1500_GPIO_IDX_IRQN, 31 WINC1500_GPIO_IDX_RESET_N, 32 33 WINC1500_GPIO_IDX_MAX 34 }; 35 36 struct winc1500_cfg { 37 struct spi_dt_spec spi; 38 struct gpio_dt_spec chip_en_gpio; 39 struct gpio_dt_spec irq_gpio; 40 struct gpio_dt_spec reset_gpio; 41 }; 42 43 struct winc1500_device { 44 struct gpio_callback gpio_cb; 45 }; 46 47 extern struct winc1500_device winc1500; 48 extern const struct winc1500_cfg winc1500_config; 49 50 #endif /* ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_NM_BSP_INTERNAL_H_ */ 51