Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2017 Inria
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
19
#ifndef BOARD_H
20
#define BOARD_H
21
22
#include <stdint.h>
23
24
#include "cpu.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define XTIMER_WIDTH (16)
35
41
#define SX127X_PARAM_SPI (SPI_DEV(1))
42
#define SX127X_PARAM_SPI_NSS GPIO_PIN(PORT_A, 15)
43
44
#define SX127X_PARAM_RESET GPIO_PIN(PORT_C, 0)
45
#define SX127X_PARAM_DIO0 GPIO_PIN(PORT_B, 4)
46
#define SX127X_PARAM_DIO1 GPIO_PIN(PORT_B, 1)
47
#define SX127X_PARAM_DIO2 GPIO_PIN(PORT_B, 0)
48
#define SX127X_PARAM_DIO3 GPIO_PIN(PORT_C, 13)
49
50
#define RADIO_TCXO_VCC_PIN GPIO_PIN(PORT_A, 12)
51
57
#define LED0_PIN GPIO_PIN(PORT_A, 5)
58
#define LED0_MASK (1 << 5)
59
60
#define LED0_ON (GPIOA->BSRR = LED0_MASK)
61
#define LED0_OFF (GPIOA->BSRR = (LED0_MASK << 16))
62
#define LED0_TOGGLE (GPIOA->ODR ^= LED0_MASK)
63
64
#define LED1_PIN GPIO_PIN(PORT_B, 5)
65
#define LED1_MASK (1 << 5)
66
67
#define LED1_ON (GPIOB->BSRR = LED1_MASK)
68
#define LED1_OFF (GPIOB->BSRR = (LED1_MASK << 16))
69
#define LED1_TOGGLE (GPIOB->ODR ^= LED1_MASK)
70
71
#define LED2_PIN GPIO_PIN(PORT_B, 6)
72
#define LED2_MASK (1 << 6)
73
74
#define LED2_ON (GPIOB->BSRR = LED2_MASK)
75
#define LED2_OFF (GPIOB->BSRR = (LED2_MASK << 16))
76
#define LED2_TOGGLE (GPIOB->ODR ^= LED2_MASK)
77
78
#define LED3_PIN GPIO_PIN(PORT_B, 7)
79
#define LED3_MASK (1 << 7)
80
81
#define LED3_ON (GPIOB->BSRR = LED3_MASK)
82
#define LED3_OFF (GPIOB->BSRR = (LED3_MASK << 16))
83
#define LED3_TOGGLE (GPIOB->ODR ^= LED3_MASK)
84
89
#define BTN_B1_PIN GPIO_PIN(PORT_B, 2)
90
94
void
board_init
(
void
);
95
96
#ifdef __cplusplus
97
}
98
#endif
99
100
#endif
/* BOARD_H */
101
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17