Mesh4all
May the mesh be with you

Board specific definitions for the M4A-MB. More...

#include "cpu.h"
#include "periph_conf.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void board_init (void)
 Initialize the board.
 

xTimer configuration

#define XTIMER_DEV   TIMER_DEV(1)
 
#define XTIMER_CHAN   (0)
 

LED PORT is PB

#define LED_PORT   PORT->Group[PB]
 

LED D0 (orange) definition and handler

#define LED0_PIN   GPIO_PIN(PB, 30)
 
#define LED0_MASK   (1 << 30)
 
#define LED0_ON   (LED_PORT.OUTCLR.reg = LED0_MASK)
 
#define LED0_OFF   (LED_PORT.OUTSET.reg = LED0_MASK)
 
#define LED0_TOGGLE   (LED_PORT.OUTTGL.reg = LED0_MASK)
 

LED-D1 (green) definition and handler

#define LED1_PIN   GPIO_PIN(PB, 7)
 
#define LED1_MASK   (1 << 7)
 
#define LED1_ON   (LED_PORT.OUTCLR.reg = LED1_MASK)
 
#define LED1_OFF   (LED_PORT.OUTSET.reg = LED1_MASK)
 
#define LED1_TOGGLE   (LED_PORT.OUTTGL.reg = LED1_MASK)
 

LED-D2 (yellow) definition and handler

#define LED2_PIN   GPIO_PIN(PB, 6)
 
#define LED2_MASK   (1 << 6)
 
#define LED2_ON   (LED_PORT.OUTCLR.reg = LED2_MASK)
 
#define LED2_OFF   (LED_PORT.OUTSET.reg = LED2_MASK)
 
#define LED2_TOGGLE   (LED_PORT.OUTTGL.reg = LED2_MASK)
 

SW0 (Button) pin definition

#define BTN0_PORT   PORT->Group[PA]
 
#define BTN0_PIN   GPIO_PIN(PA, 15)
 
#define BTN0_MODE   GPIO_IN_PU
 

AT86RF215 pin definitions

#define AT86RF215_PARAM_SPI   SPI_DEV(0)
 
#define AT86RF215_PARAM_CS   GPIO_PIN(PA, 5)
 
#define AT86RF215_PARAM_INT   GPIO_PIN(PB, 4)
 
#define AT86RF215_PARAM_RESET   GPIO_PIN(PB, 2)
 

Detailed Description

Board specific definitions for the M4A-MB.

Definition in file board.h.

Macro Definition Documentation

◆ AT86RF215_PARAM_CS

#define AT86RF215_PARAM_CS   GPIO_PIN(PA, 5)

CS is routef to PA5 in the MCU

Definition at line 91 of file board.h.

◆ AT86RF215_PARAM_INT

#define AT86RF215_PARAM_INT   GPIO_PIN(PB, 4)

IN is routed to PB4 in the MCU

Definition at line 92 of file board.h.

◆ AT86RF215_PARAM_RESET

#define AT86RF215_PARAM_RESET   GPIO_PIN(PB, 2)

RESET is routed to PB2 in the MCU

Definition at line 93 of file board.h.

◆ AT86RF215_PARAM_SPI

#define AT86RF215_PARAM_SPI   SPI_DEV(0)

Use SPI 0

Definition at line 90 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

Mode Pull UP, as input

Definition at line 83 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(PA, 15)

Routed to PIN PA,15

Definition at line 82 of file board.h.

◆ BTN0_PORT

#define BTN0_PORT   PORT->Group[PA]

Definition at line 81 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 30)

Definition at line 49 of file board.h.

◆ LED0_OFF

#define LED0_OFF   (LED_PORT.OUTSET.reg = LED0_MASK)

Power Off LED0

Definition at line 51 of file board.h.

◆ LED0_ON

#define LED0_ON   (LED_PORT.OUTCLR.reg = LED0_MASK)

Power On LED0

Definition at line 50 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(PB, 30)

LED0, routed to pin PB30 to the MCU

Definition at line 48 of file board.h.

◆ LED0_TOGGLE

#define LED0_TOGGLE   (LED_PORT.OUTTGL.reg = LED0_MASK)

Change the status of LED0

Definition at line 52 of file board.h.

◆ LED1_MASK

#define LED1_MASK   (1 << 7)

Definition at line 60 of file board.h.

◆ LED1_OFF

#define LED1_OFF   (LED_PORT.OUTSET.reg = LED1_MASK)

Power Off LED1

Definition at line 62 of file board.h.

◆ LED1_ON

#define LED1_ON   (LED_PORT.OUTCLR.reg = LED1_MASK)

Power On LED1

Definition at line 61 of file board.h.

◆ LED1_PIN

#define LED1_PIN   GPIO_PIN(PB, 7)

LED1 is routed to pin PB7 in the MCU

Definition at line 59 of file board.h.

◆ LED1_TOGGLE

#define LED1_TOGGLE   (LED_PORT.OUTTGL.reg = LED1_MASK)

Change the status of LED1

Definition at line 63 of file board.h.

◆ LED2_MASK

#define LED2_MASK   (1 << 6)

Definition at line 71 of file board.h.

◆ LED2_OFF

#define LED2_OFF   (LED_PORT.OUTSET.reg = LED2_MASK)

Power Off LED2

Definition at line 73 of file board.h.

◆ LED2_ON

#define LED2_ON   (LED_PORT.OUTCLR.reg = LED2_MASK)

Power On LED2

Definition at line 72 of file board.h.

◆ LED2_PIN

#define LED2_PIN   GPIO_PIN(PB, 6)

LED2, routed to pin PB6 in the MCU

Definition at line 70 of file board.h.

◆ LED2_TOGGLE

#define LED2_TOGGLE   (LED_PORT.OUTTGL.reg = LED2_MASK)

Change the status of LED2

Definition at line 74 of file board.h.

◆ LED_PORT

#define LED_PORT   PORT->Group[PB]

Group is Port B

Definition at line 41 of file board.h.

◆ XTIMER_CHAN

#define XTIMER_CHAN   (0)

Timer Channel

Definition at line 34 of file board.h.

◆ XTIMER_DEV

#define XTIMER_DEV   TIMER_DEV(1)

Timer Device

Definition at line 33 of file board.h.