Support for the SenseBox MCU with SAMD21 board. More...
Support for the SenseBox MCU with SAMD21 board.
Board specific configuration for the SenseBox MCU with SAMD21 board.
Definition in file board.h.
Go to the source code of this file.
Macros | |
#define | WAIT_FOR_SPI_RESET (3000000UL) |
Delay to wait for SPI reset. | |
#define | HDC1000_PARAM_ADDR (0x40) |
HDC1000 Temperature & Humidity sensor. | |
#define | TSL2561_PARAM_ADDR TSL2561_ADDR_LOW |
TSL2561 Visible light sensor. | |
#define | BMX280_PARAM_I2C_ADDR (0x76) |
BMP280 Pressure and temperature sensor. | |
Functions | |
void | board_init (void) |
Initialize board specific hardware, including clock, LEDs and std-IO. | |
LED pin definitions and handlers | |
#define | LED0_PIN GPIO_PIN(PA, 27) |
#define | LED_PORT PORT->Group[PA] |
#define | LED0_MASK (1 << 27) |
#define | LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK) |
#define | LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK) |
#define | LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK) |
#define | LED1_PIN GPIO_PIN(PA, 28) |
#define | LED1_MASK (1 << 28) |
#define | LED1_ON (LED_PORT.OUTSET.reg = LED1_MASK) |
#define | LED1_OFF (LED_PORT.OUTCLR.reg = LED1_MASK) |
#define | LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK) |
SW0 (Button) pin definitions | |
#define | BTN0_PORT PORT->Group[PA] |
#define | BTN0_PIN GPIO_PIN(PA, 20) |
#define | BTN0_MODE GPIO_IN_PU |
XBEE1 bus | |
The enable pin is 'XBEE1_EN_PIN'. To disable this bus call 'XBEE1_DISABLE', to re-enable it call 'XBEE1_ENABLE'. | |
#define | XBEE1_EN_PORT PORT->Group[PB] |
#define | XBEE1_EN_MASK (1 << 3) |
#define | XBEE1_EN_MODE GPIO_OUT |
#define | XBEE1_EN_PIN GPIO_PIN(PB, 3) |
#define | XBEE1_ENABLE (XBEE1_EN_PORT.OUTCLR.reg = XBEE1_EN_MASK) |
#define | XBEE1_DISABLE (XBEE1_EN_PORT.OUTSET.reg = XBEE1_EN_MASK) |
#define | XBEE1_CS_PIN GPIO_PIN(PA, 18) |
#define | XBEE1_INT_PIN GPIO_PIN(PA, 21) |
XBEE2 bus | |
The enable pin is 'XBEE2_EN_PIN'. To disable this bus call 'XBEE2_DISABLE', to re-enable it call 'XBEE2_ENABLE'. | |
#define | XBEE2_EN_PORT PORT->Group[PB] |
#define | XBEE2_EN_MASK (1 << 10) |
#define | XBEE2_EN_PIN GPIO_PIN(PB, 10) |
#define | XBEE2_EN_MODE GPIO_OUT |
#define | XBEE2_ENABLE (XBEE2_EN_PORT.OUTCLR.reg = XBEE2_EN_MASK) |
#define | XBEE2_DISABLE (XBEE2_EN_PORT.OUTSET.reg = XBEE2_EN_MASK) |
#define | XBEE2_CS_PIN GPIO_PIN(PA, 14) |
#define | XBEE2_INT_PIN GPIO_PIN(PA, 15) |
I2C bus | |
The enable pin is 'I2C_EN_PIN'. To disable this bus call 'I2C_DISABLE', to re-enable it call 'I2C_ENABLE'. | |
#define | I2C_EN_PORT PORT->Group[PB] |
#define | I2C_EN_MASK (1 << 11) |
#define | I2C_EN_PIN GPIO_PIN(PB, 11) |
#define | I2C_EN_MODE GPIO_OUT |
#define | I2C_ENABLE (I2C_EN_PORT.OUTSET.reg = I2C_EN_MASK) |
#define | I2C_DISABLE (I2C_EN_PORT.OUTCLR.reg = I2C_EN_MASK) |
SX127X | |
SX127X configuration (on XBEE1 port). This particular board has merged DIO0 and DIO1 interrupt pins into one. The driver will always check the interrupt type in the ISR handler, so it's enough to set the DIO0 pin in order to handle both DIO0 and DIO1. | |
#define | SX127X_PARAM_SPI (SPI_DEV(0)) |
#define | SX127X_PARAM_SPI_NSS XBEE1_CS_PIN /* D23 */ |
#define | SX127X_PARAM_RESET GPIO_UNDEF |
#define | SX127X_PARAM_DIO0 XBEE1_INT_PIN /* D24 */ |
#define | SX127X_PARAM_DIO1 GPIO_UNDEF |
#define | SX127X_PARAM_DIO2 GPIO_UNDEF |
#define | SX127X_PARAM_DIO3 GPIO_UNDEF |
#define | SX127X_PARAM_PASELECT (SX127X_PA_BOOST) |
#define | MTD_0 mtd0 |
mtd_dev_t * | mtd0 |
MTD device 0 (SD Card) definition. More... | |
#define | MTD_SD_CARD_PAGE_SIZE (512) |
Attributes for the mtd_sdcard driver. | |
#define | MTD_SD_CARD_PAGES_PER_SECTOR (128) |
#define | MTD_SD_CARD_SECTOR_COUNT (3921920UL) |
mtd_dev_t* mtd0 |
MTD device 0 (SD Card) definition.
mtd0 is defined in board.c