2017-05-03 15:09:29 +08:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2017 IpTronix
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_NM_BSP_INTERNAL_H_
|
|
|
|
#define ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_NM_BSP_INTERNAL_H_
|
2017-05-03 15:09:29 +08:00
|
|
|
|
|
|
|
#include <device.h>
|
2019-06-26 03:53:52 +08:00
|
|
|
#include <drivers/gpio.h>
|
2019-06-26 03:54:01 +08:00
|
|
|
#include <drivers/spi.h>
|
2017-05-03 15:09:29 +08:00
|
|
|
|
|
|
|
#include "wifi_winc1500_config.h"
|
|
|
|
#include <bus_wrapper/include/nm_bus_wrapper.h>
|
|
|
|
|
|
|
|
extern tstrNmBusCapabilities egstrNmBusCapabilities;
|
|
|
|
|
|
|
|
#define NM_EDGE_INTERRUPT (1)
|
|
|
|
|
|
|
|
#define NM_DEBUG CONF_WINC_DEBUG
|
|
|
|
#define NM_BSP_PRINTF CONF_WINC_PRINTF
|
|
|
|
|
2020-01-24 16:24:59 +08:00
|
|
|
enum winc1500_gpio_index {
|
|
|
|
WINC1500_GPIO_IDX_CHIP_EN = 0,
|
|
|
|
WINC1500_GPIO_IDX_IRQN,
|
|
|
|
WINC1500_GPIO_IDX_RESET_N,
|
|
|
|
|
|
|
|
WINC1500_GPIO_IDX_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
struct winc1500_gpio_configuration {
|
2020-05-01 02:33:38 +08:00
|
|
|
const struct device *dev;
|
2020-05-28 00:26:57 +08:00
|
|
|
uint32_t pin;
|
2020-01-24 16:24:59 +08:00
|
|
|
};
|
|
|
|
|
2017-05-03 15:09:29 +08:00
|
|
|
struct winc1500_device {
|
2017-11-02 19:07:25 +08:00
|
|
|
struct winc1500_gpio_configuration *gpios;
|
|
|
|
struct gpio_callback gpio_cb;
|
2020-05-01 02:33:38 +08:00
|
|
|
const struct device *spi;
|
2017-11-03 00:28:19 +08:00
|
|
|
struct spi_config spi_cfg;
|
2017-05-03 15:09:29 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct winc1500_device winc1500;
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_NM_BSP_INTERNAL_H_ */
|