mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/ruuvitag: init and set CS pins in board_init
This commit is contained in:
parent
03526815a1
commit
14842f943a
@ -34,10 +34,18 @@ extern "C" {
|
||||
#define LED0_PIN GPIO_PIN(0, 17)
|
||||
#define LED1_PIN GPIO_PIN(0, 19)
|
||||
|
||||
/* as a shortcut, we include the two CS pins into the LED_MASK, this will make
|
||||
* sure both pins are initialized as output and set during board initialization.
|
||||
* This is needed so that the BMX280 and LIS2DH12 device drivers do not
|
||||
* interfere... */
|
||||
#define CS_PIN_MASK ((1 << 3) | (1 << 8))
|
||||
|
||||
#define LED_PORT NRF_P0
|
||||
#define LED0_MASK (1 << 17)
|
||||
#define LED1_MASK (1 << 19)
|
||||
#define LED_MASK (LED0_MASK | LED1_MASK)
|
||||
|
||||
/* mask used in the common board.c file to initialize and set the given pins */
|
||||
#define LED_MASK (LED0_MASK | LED1_MASK | CS_PIN_MASK)
|
||||
|
||||
#define LED0_ON (LED_PORT->OUTCLR = LED0_MASK)
|
||||
#define LED0_OFF (LED_PORT->OUTSET = LED0_MASK)
|
||||
|
Loading…
Reference in New Issue
Block a user