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
* SPDX-FileCopyrightText: 2017 Baptiste Clenet <bapclenet@gmail.com>
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
17
18
#include "cpu.h"
19
#include "
periph/gpio.h
"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
29
#define AT86RF2XX_PARAM_SPI SPI_DEV(0)
30
#define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
31
#define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
32
#define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
33
#define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
34
#define AT86RF2XX_PARAM_SPI_CLK SPI_CLK_5MHZ
36
41
#define LED_PORT PORT->Group[0]
42
43
#define LED0_PIN GPIO_PIN(PA, 18)
44
#define LED0_MASK (1 << 18)
45
#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
46
#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
47
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
48
49
#define LED1_PIN GPIO_PIN(PA, 19)
50
#define LED1_MASK (1 << 19)
51
#define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
52
#define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
53
#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
55
60
#define BTN0_PIN GPIO_PIN(PA, 28)
61
#define BTN0_MODE GPIO_IN_PU
63
68
#define RFCTL1_PIN GPIO_PIN(PA, 9)
69
#define RFCTL2_PIN GPIO_PIN(PA, 12)
71
75
enum
{
76
RFCTL_ANTENNA_BOARD,
77
RFCTL_ANTENNA_EXT,
78
};
79
84
#ifndef RFCTL_ANTENNA_DEFAULT
85
#define RFCTL_ANTENNA_DEFAULT RFCTL_ANTENNA_BOARD
86
#endif
88
92
void
board_antenna_config
(uint8_t antenna);
93
94
#ifdef __cplusplus
95
}
96
#endif
97
gpio.h
Low-level GPIO peripheral driver interface definitions.
board_antenna_config
void board_antenna_config(uint8_t antenna)
Set antenna switch.
Generated on Tue May 5 2026 15:28:26 by
1.13.2