1 /**
2  * Copyright (c) 2017 IpTronix
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_CONFIG_H_
8 #define ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_CONFIG_H_
9 
10 /*
11    ---------------------------------
12    ---------- PIN settings ---------
13    ---------------------------------
14  */
15 #define CONF_WINC_PIN_RESET			IOPORT_CREATE_PIN(PIOA, 24)
16 #define CONF_WINC_PIN_CHIP_ENABLE		IOPORT_CREATE_PIN(PIOA, 6)
17 #define CONF_WINC_PIN_WAKE			IOPORT_CREATE_PIN(PIOA, 25)
18 
19 /*
20    ---------------------------------
21    ---------- SPI settings ---------
22    ---------------------------------
23  */
24 #define CONF_WINC_USE_SPI			(1)
25 
26 /** SPI pin and instance settings. */
27 #define CONF_WINC_SPI				SPI
28 #define CONF_WINC_SPI_ID			ID_SPI
29 #define CONF_WINC_SPI_MISO_GPIO			SPI_MISO_GPIO
30 #define CONF_WINC_SPI_MISO_FLAGS		SPI_MISO_FLAGS
31 #define CONF_WINC_SPI_MOSI_GPIO			SPI_MOSI_GPIO
32 #define CONF_WINC_SPI_MOSI_FLAGS		SPI_MOSI_FLAGS
33 #define CONF_WINC_SPI_CLK_GPIO			SPI_SPCK_GPIO
34 #define CONF_WINC_SPI_CLK_FLAGS			SPI_SPCK_FLAGS
35 #define CONF_WINC_SPI_CS_GPIO			SPI_NPCS0_GPIO
36 #define CONF_WINC_SPI_CS_FLAGS			PIO_OUTPUT_1
37 #define CONF_WINC_SPI_NPCS			(0)
38 
39 /** SPI delay before SPCK and between consecutive transfer. */
40 #define CONF_WINC_SPI_DLYBS			(0)
41 #define CONF_WINC_SPI_DLYBCT			(0)
42 
43 /** SPI interrupt pin. */
44 #define CONF_WINC_SPI_INT_PIN			IOPORT_CREATE_PIN(PIOA, 1)
45 #define CONF_WINC_SPI_INT_PIO			PIOA
46 #define CONF_WINC_SPI_INT_PIO_ID		ID_PIOA
47 #define CONF_WINC_SPI_INT_MASK			(1 << 1)
48 #define CONF_WINC_SPI_INT_PRIORITY		(0)
49 
50 /** Clock polarity & phase. */
51 #define CONF_WINC_SPI_POL			(0)
52 #define CONF_WINC_SPI_PHA			(1)
53 
54 /** SPI clock. */
55 #define CONF_WINC_SPI_CLOCK			(48000000)
56 
57 /*
58    ---------------------------------
59    --------- Debug Options ---------
60    ---------------------------------
61  */
62 #include <stdio.h>
63 #define CONF_WINC_DEBUG				(0)
64 #define CONF_WINC_PRINTF			printf
65 
66 #endif /* ZEPHYR_DRIVERS_WIFI_WINC1500_WIFI_WINC1500_CONFIG_H_ */
67