•All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #ifndef BOARD_H
22 #define BOARD_H
23 
24 #include "cpu.h"
25 #include "periph_conf.h"
26 #include "periph_cpu.h"
27 #include "periph/gpio.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 #define XTIMER_DEV TIMER_DEV(1)
38 #define XTIMER_CHAN (0)
45 #define CONFIG_ZTIMER_USEC_TYPE ZTIMER_TYPE_PERIPH_TIMER
46 #define CONFIG_ZTIMER_USEC_DEV TIMER_DEV(1)
47 /* timer_set() may underflow for values smaller than 9, set 10 as margin */
48 #define CONFIG_ZTIMER_USEC_MIN (10)
56 #define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
57 #define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
58 #define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
59 #define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
60 
65 #define LED0_PIN GPIO_PIN(0, 19)
66 
67 #define LED_PORT PORT->Group[0]
68 #define LED0_MASK (1 << 19)
69 
70 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
71 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
72 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
79 #define BTN0_PIN GPIO_PIN(0, 28)
80 #define BTN0_MODE GPIO_IN_PU
87 #define RFCTL1_PIN GPIO_PIN(0, 9)
88 #define RFCTL2_PIN GPIO_PIN(0, 12)
94 enum {
95  RFCTL_ANTENNA_BOARD,
96  RFCTL_ANTENNA_EXT,
97 };
98 
103 #ifndef RFCTL_ANTENNA_DEFAULT
104 #define RFCTL_ANTENNA_DEFAULT RFCTL_ANTENNA_BOARD
105 #endif
111 void board_antenna_config(uint8_t antenna);
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif /* BOARD_H */
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.
void board_antenna_config(uint8_t antenna)
Set antenna switch.