Skip to content

Commit 9b3ffec

Browse files
committed
fixup! winc1500: moved the module pin config to boards include directory
1 parent 061339f commit 9b3ffec

File tree

3 files changed

+97
-23
lines changed

3 files changed

+97
-23
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (C) 2017 Bumsik Kim <k.bumsik@gmail.com>
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser General
5+
* Public License v2.1. See the file LICENSE in the top level directory for more
6+
* details.
7+
*/
8+
9+
/**
10+
* @ingroup boards_samd21-xpro
11+
* @{
12+
*
13+
* @file
14+
* @brief WINC1500 Xplained Pro configuration for SAMD21-XPRO board
15+
* @author Bumsik Kim <k.bumsik@gmail.com>
16+
*/
17+
18+
#ifndef WINC1500_PARAMS_H
19+
#define WINC1500_PARAMS_H
20+
21+
#include "winc1500.h"
22+
23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
27+
/**
28+
* @brief Board specific WINC1500 configuration
29+
*/
30+
static const winc1500_params_t winc1500_params[] =
31+
{
32+
{
33+
.spi = SPI_DEV(0),
34+
.cs_pin = GPIO_PIN(PA, 5),
35+
.int_pin = GPIO_PIN(PB, 4),
36+
.reset_pin = GPIO_PIN(PB, 6),
37+
.en_pin = GPIO_PIN(PB, 5),
38+
.wake_pin = GPIO_PIN(PB, 7),
39+
.spi_clk = SPI_CLK_10MHZ
40+
}
41+
};
42+
43+
#ifdef __cplusplus
44+
}
45+
#endif
46+
47+
#endif /* WINC1500_PARAMS_H */
48+
/** @} */
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (C) 2017 Bumsik Kim <k.bumsik@gmail.com>
3+
*
4+
* This file is subject to the terms and conditions of the GNU Lesser General
5+
* Public License v2.1. See the file LICENSE in the top level directory for more
6+
* details.
7+
*/
8+
9+
/**
10+
* @ingroup boards_samr21-xpro
11+
* @{
12+
*
13+
* @file
14+
* @brief WINC1500 Xplained Pro configuration for SAMR21-XPRO board
15+
* @author Bumsik Kim <k.bumsik@gmail.com>
16+
*/
17+
18+
#ifndef WINC1500_PARAMS_H
19+
#define WINC1500_PARAMS_H
20+
21+
#include "winc1500.h"
22+
23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
27+
/**
28+
* @brief Board specific WINC1500 configuration
29+
*/
30+
static const winc1500_params_t winc1500_params[] =
31+
{
32+
{
33+
.spi = SPI_DEV(1)
34+
.cs_pin = GPIO_PIN(PB, 3)
35+
.int_pin = GPIO_PIN(PA, 22)
36+
.reset_pin = GPIO_PIN(PA, 13)
37+
.en_pin = GPIO_PIN(PA, 23)
38+
.wake_pin = GPIO_PIN(PA, 28)
39+
.spi_clk = SPI_CLK_10MHZ
40+
}
41+
};
42+
43+
#ifdef __cplusplus
44+
}
45+
#endif
46+
47+
#endif /* WINC1500_PARAMS_H */
48+
/** @} */

tests/driver_winc1500_netdev/Makefile

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,6 @@ USEMODULE += gnrc_icmpv6_echo
2323
CFLAGS += -DDEVELHELP -g3 -ggdb3 -O0 -Og
2424

2525
# Debugging flags. Uncomment to enable debugging mode
26-
#CFLAGS += -DLOG_LEVEL=LOG_DEBUG
27-
28-
# set board specific peripheral configurations
29-
ifneq (,$(filter samr21-xpro,$(BOARD)))
30-
# Settings for SAMR21-XPRO Board
31-
CFLAGS += -DWINC1500_SPI=\(\SPI_DEV\(1\)\)
32-
CFLAGS += -DWINC1500_SPI_CS_PIN=\(\GPIO_PIN\(PB,3\)\)
33-
CFLAGS += -DWINC1500_INTN_PIN=\(\GPIO_PIN\(PA,22\)\)
34-
35-
CFLAGS += -DWINC1500_RESET_PIN=\(\GPIO_PIN\(PA,13\)\)
36-
CFLAGS += -DWINC1500_CHIP_EN_PIN=\(\GPIO_PIN\(PA,23\)\)
37-
CFLAGS += -DWINC1500_WAKE_PIN=\(\GPIO_PIN\(PA,28\)\)
38-
39-
else ifneq (,$(filter samd21-xpro,$(BOARD)))
40-
# Settings for SAMD21-XPRO Board
41-
CFLAGS += -DWINC1500_SPI=\(SPI_DEV\(0\)\)
42-
CFLAGS += -DWINC1500_SPI_CS_PIN=\(GPIO_PIN\(PA,5\)\)
43-
CFLAGS += -DWINC1500_INTN_PIN=\(GPIO_PIN\(PB,4\)\)
44-
45-
CFLAGS += -DWINC1500_RESET_PIN=\(GPIO_PIN\(PB,6\)\)
46-
CFLAGS += -DWINC1500_CHIP_EN_PIN=\(GPIO_PIN\(PB,5\)\)
47-
CFLAGS += -DWINC1500_WAKE_PIN=\(GPIO_PIN\(PB,7\)\)
48-
endif
26+
CFLAGS += -DLOG_LEVEL=LOG_DEBUG
4927

5028
include $(RIOTBASE)/Makefile.include

0 commit comments

Comments
 (0)