Mesh4all
May the mesh be with you

Board specific definitions for the M4A-24G board. 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.

Enumerations

enum  { RFCTL_ANTENNA_BOARD , RFCTL_ANTENNA_EXT }
 Antenna configuration values. More...
 

Functions

void board_init (void)
 Initialize board specific hardware, including clock, LEDs and std-IO.
 
void board_antenna_config (uint8_t antenna)
 Set antenna switch. More...
 

xtimer configuration

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

ztimer configuration

#define CONFIG_ZTIMER_USEC_TYPE   ZTIMER_TYPE_PERIPH_TIMER
 
#define CONFIG_ZTIMER_USEC_DEV   TIMER_DEV(1)
 
#define CONFIG_ZTIMER_USEC_MIN   (10)
 

AT86RF233 configuration

#define AT86RF2XX_PARAM_CS   GPIO_PIN(PB, 31)
 
#define AT86RF2XX_PARAM_INT   GPIO_PIN(PB, 0)
 
#define AT86RF2XX_PARAM_SLEEP   GPIO_PIN(PA, 20)
 
#define AT86RF2XX_PARAM_RESET   GPIO_PIN(PB, 15)
 

LED pin definitions and handlers

#define LED0_PIN   GPIO_PIN(0, 19)
 
#define LED_PORT   PORT->Group[0]
 
#define LED0_MASK   (1 << 19)
 
#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)
 

SW0 (Button) pin definitions

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

Antenna configuration pin interface

#define RFCTL1_PIN   GPIO_PIN(0, 9)
 
#define RFCTL2_PIN   GPIO_PIN(0, 12)
 

Default antenna configuration

#define RFCTL_ANTENNA_DEFAULT   RFCTL_ANTENNA_BOARD
 IF NOT defined as default any RF antenna option, use the on-board antenna
 

Detailed Description

Board specific definitions for the M4A-24G board.

Author
Thomas Eichinger thoma.nosp@m.s.ei.nosp@m.ching.nosp@m.er@f.nosp@m.u-ber.nosp@m.lin..nosp@m.de
Sebastian Meiling s@mln.nosp@m.g.ne.nosp@m.t
luisan00 luisa.nosp@m.n00@.nosp@m.hotma.nosp@m.il.c.nosp@m.om

Definition in file board.h.

Macro Definition Documentation

◆ AT86RF2XX_PARAM_CS

#define AT86RF2XX_PARAM_CS   GPIO_PIN(PB, 31)

CS pin routed to PB31 in the MCU

Definition at line 55 of file board.h.

◆ AT86RF2XX_PARAM_INT

#define AT86RF2XX_PARAM_INT   GPIO_PIN(PB, 0)

INT pin routed to PB0 in the MCU

Definition at line 56 of file board.h.

◆ AT86RF2XX_PARAM_RESET

#define AT86RF2XX_PARAM_RESET   GPIO_PIN(PB, 15)

RST is routed to PB15 in the MCU

Definition at line 58 of file board.h.

◆ AT86RF2XX_PARAM_SLEEP

#define AT86RF2XX_PARAM_SLEEP   GPIO_PIN(PA, 20)

SLEEP pin routed to PA20 in the MCU

Definition at line 57 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN_PU

BTN0 GPIO mode

Definition at line 79 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(0, 28)

BTN0 routed to GPIO_PIN(0, 28)

Definition at line 78 of file board.h.

◆ BTN0_PORT

#define BTN0_PORT   PORT->Group[0]

BTN0 port

Definition at line 77 of file board.h.

◆ CONFIG_ZTIMER_USEC_DEV

#define CONFIG_ZTIMER_USEC_DEV   TIMER_DEV(1)

ztimer device

Definition at line 44 of file board.h.

◆ CONFIG_ZTIMER_USEC_MIN

#define CONFIG_ZTIMER_USEC_MIN   (10)
Note
timer_set() may underflow for values smaller than 9, set 10 as margin

Definition at line 48 of file board.h.

◆ CONFIG_ZTIMER_USEC_TYPE

#define CONFIG_ZTIMER_USEC_TYPE   ZTIMER_TYPE_PERIPH_TIMER

ztimer periph

Definition at line 43 of file board.h.

◆ LED0_MASK

#define LED0_MASK   (1 << 19)

LED0 mask

Definition at line 67 of file board.h.

◆ LED0_OFF

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

LED0 Handler

Definition at line 69 of file board.h.

◆ LED0_ON

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

LED0 Handler

Definition at line 68 of file board.h.

◆ LED0_PIN

#define LED0_PIN   GPIO_PIN(0, 19)

LED0 is routed to GPIO(0, 19)

Definition at line 65 of file board.h.

◆ LED0_TOGGLE

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

LED0 Handler

Definition at line 70 of file board.h.

◆ LED_PORT

#define LED_PORT   PORT->Group[0]

LED0 port

Definition at line 66 of file board.h.

◆ RFCTL1_PIN

#define RFCTL1_PIN   GPIO_PIN(0, 9)

RF control pin 1 assigned to GPIO(0, 9)

Definition at line 86 of file board.h.

◆ RFCTL2_PIN

#define RFCTL2_PIN   GPIO_PIN(0, 12)

RF control pin 2 is assigned to GPIO(0, 12)

Definition at line 87 of file board.h.

◆ XTIMER_CHAN

#define XTIMER_CHAN   (0)

xtimer channel

Definition at line 36 of file board.h.

◆ XTIMER_DEV

#define XTIMER_DEV   TIMER_DEV(1)

xtimer device

Definition at line 35 of file board.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Antenna configuration values.

  • RFCTL_ANTENNA_BOARD: On-board antenna
  • RFCTL_ANTENA_EXT: External antenna

Definition at line 96 of file board.h.

Function Documentation

◆ board_antenna_config()

void board_antenna_config ( uint8_t  antenna)

Set antenna switch.

Parameters
[in]antennaantenna to be used
Option Value Description
RFCTL_ANTENNA_BOARD 0 On-board antenna
RFCTL_ANTENNA_EXT 1 External antenna