27#include "periph_cpu.h"
38#define LED0_PIN GPIO_PIN(PA, 27)
40#define LED_PORT PORT->Group[PA]
41#define LED0_MASK (1 << 27)
43#define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK)
44#define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK)
45#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
47#define LED1_PIN GPIO_PIN(PA, 28)
48#define LED1_MASK (1 << 28)
50#define LED1_ON (LED_PORT.OUTSET.reg = LED1_MASK)
51#define LED1_OFF (LED_PORT.OUTCLR.reg = LED1_MASK)
52#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
59#define BTN0_PIN GPIO_PIN(PA, 20)
60#define BTN0_MODE GPIO_IN_PU
70#define XBEE1_EN_PORT PORT->Group[PB]
71#define XBEE1_EN_MASK (1 << 3)
72#define XBEE1_EN_MODE GPIO_OUT
73#define XBEE1_EN_PIN GPIO_PIN(PB, 3)
75#define XBEE1_ENABLE (XBEE1_EN_PORT.OUTCLR.reg = XBEE1_EN_MASK)
76#define XBEE1_DISABLE (XBEE1_EN_PORT.OUTSET.reg = XBEE1_EN_MASK)
78#define XBEE1_CS_PIN GPIO_PIN(PA, 18)
80#define XBEE1_INT_PIN GPIO_PIN(PA, 21)
90#define XBEE2_EN_PORT PORT->Group[PB]
91#define XBEE2_EN_MASK (1 << 10)
92#define XBEE2_EN_PIN GPIO_PIN(PB, 10)
93#define XBEE2_EN_MODE GPIO_OUT
95#define XBEE2_ENABLE (XBEE2_EN_PORT.OUTCLR.reg = XBEE2_EN_MASK)
96#define XBEE2_DISABLE (XBEE2_EN_PORT.OUTSET.reg = XBEE2_EN_MASK)
98#define XBEE2_CS_PIN GPIO_PIN(PA, 14)
100#define XBEE2_INT_PIN GPIO_PIN(PA, 15)
110#define I2C_EN_PORT PORT->Group[PB]
111#define I2C_EN_MASK (1 << 11)
112#define I2C_EN_PIN GPIO_PIN(PB, 11)
113#define I2C_EN_MODE GPIO_OUT
115#define I2C_ENABLE (I2C_EN_PORT.OUTSET.reg = I2C_EN_MASK)
116#define I2C_DISABLE (I2C_EN_PORT.OUTCLR.reg = I2C_EN_MASK)
128#define SX127X_PARAM_SPI (SPI_DEV(0))
130#define SX127X_PARAM_SPI_NSS XBEE1_CS_PIN
132#define SX127X_PARAM_RESET GPIO_UNDEF
134#define SX127X_PARAM_DIO0 XBEE1_INT_PIN
136#define SX127X_PARAM_DIO1 GPIO_UNDEF
138#define SX127X_PARAM_DIO2 GPIO_UNDEF
140#define SX127X_PARAM_DIO3 GPIO_UNDEF
142#define SX127X_PARAM_PASELECT (SX127X_PA_BOOST)
148#define WAIT_FOR_SPI_RESET (3000000UL)
153#define HDC1000_PARAM_ADDR (0x40)
158#define TSL2561_PARAM_ADDR TSL2561_ADDR_LOW
163#define BMX280_PARAM_I2C_ADDR (0x76)
165#if defined(MODULE_MTD_SDCARD) || defined(DOXYGEN)
170#define MTD_0 mtd_dev_get(0)
Configuration of CPU peripherals for SenseBox MCU with SAMD21.
Low-level GPIO peripheral driver interface definitions.