Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
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
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
36
#define XTIMER_DEV TIMER_DEV(1)
37
#define XTIMER_CHAN (0)
44
#define CONFIG_ZTIMER_USEC_TYPE ZTIMER_TYPE_PERIPH_TIMER
45
#define CONFIG_ZTIMER_USEC_DEV TIMER_DEV(1)
46
/* timer_set() may underflow for values smaller than 9, set 10 as margin */
47
#define CONFIG_ZTIMER_USEC_MIN (10)
55
#define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
56
#define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
57
#define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
58
#define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
59
64
#define LED0_PIN GPIO_PIN(0, 19)
65
66
#define LED_PORT PORT->Group[0]
67
#define LED0_MASK (1 << 19)
68
69
#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
70
#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
71
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
78
#define BTN0_PIN GPIO_PIN(0, 28)
79
#define BTN0_MODE GPIO_IN_PU
86
#define RFCTL1_PIN GPIO_PIN(0, 9)
87
#define RFCTL2_PIN GPIO_PIN(0, 12)
93
enum
{
94
RFCTL_ANTENNA_BOARD,
95
RFCTL_ANTENNA_EXT,
96
};
97
102
#ifndef RFCTL_ANTENNA_DEFAULT
103
#define RFCTL_ANTENNA_DEFAULT RFCTL_ANTENNA_BOARD
104
#endif
110
void
board_antenna_config
(uint8_t antenna);
111
#ifdef __cplusplus
112
}
113
#endif
114
115
#endif
/* BOARD_H */
periph_conf.h
Native CPU peripheral configuration.
board_antenna_config
void board_antenna_config(uint8_t antenna)
Set antenna switch.
Generated on Fri Mar 29 2024 00:15:43 by
1.9.8