board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2014 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include "cpu.h"
21 #include "periph_conf.h"
22 #include "periph_cpu.h"
23 #include "periph/gpio.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #define XTIMER_DEV TIMER_DEV(1)
34 #define XTIMER_CHAN (0)
41 #define CONFIG_ZTIMER_USEC_TYPE ZTIMER_TYPE_PERIPH_TIMER
42 #define CONFIG_ZTIMER_USEC_DEV TIMER_DEV(1)
43 /* timer_set() may underflow for values smaller than 9, set 10 as margin */
44 #define CONFIG_ZTIMER_USEC_MIN (10)
52 #define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
53 #define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
54 #define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
55 #define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
56 
61 #define LED0_PIN GPIO_PIN(0, 19)
62 
63 #define LED_PORT PORT->Group[0]
64 #define LED0_MASK (1 << 19)
65 
66 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
67 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
68 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
75 #define BTN0_PIN GPIO_PIN(0, 28)
76 #define BTN0_MODE GPIO_IN_PU
83 #define RFCTL1_PIN GPIO_PIN(0, 9)
84 #define RFCTL2_PIN GPIO_PIN(0, 12)
90 enum {
91  RFCTL_ANTENNA_BOARD,
92  RFCTL_ANTENNA_EXT,
93 };
94 
99 #ifndef RFCTL_ANTENNA_DEFAULT
100 #define RFCTL_ANTENNA_DEFAULT RFCTL_ANTENNA_BOARD
101 #endif
107 void board_antenna_config(uint8_t antenna);
108 #ifdef __cplusplus
109 }
110 #endif
111 
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.
void board_antenna_config(uint8_t antenna)
Set antenna switch.