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) 2018 OTA keys S.A.
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 <stdint.h>
25
26
#include "cpu.h"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
36
#define LED0_PIN GPIO_PIN(PORT_E, 3)
37
#define LED0_MASK (1 << 3)
38
39
#define LED0_ON (GPIOE->BSRR = LED0_MASK)
40
#define LED0_OFF (GPIOE->BSRR = (LED0_MASK << 16))
41
#define LED0_TOGGLE (GPIOE->ODR ^= LED0_MASK)
42
43
#define LED1_PIN GPIO_PIN(PORT_E, 4)
44
#define LED1_MASK (1 << 4)
45
46
#define LED1_ON (GPIOE->BSRR = LED1_MASK)
47
#define LED1_OFF (GPIOE->BSRR = (LED1_MASK << 16))
48
#define LED1_TOGGLE (GPIOE->ODR ^= LED1_MASK)
49
50
#define LED2_PIN GPIO_PIN(PORT_E, 1)
51
#define LED2_MASK (1 << 1)
52
53
#define LED2_ON (GPIOE->BSRR = LED2_MASK)
54
#define LED2_OFF (GPIOE->BSRR = (LED2_MASK << 16))
55
#define LED2_TOGGLE (GPIOE->ODR ^= LED2_MASK)
56
61
#define BTN_B1_PIN GPIO_PIN(PORT_C, 13)
62
68
#define SI70XX_PARAM_I2C_DEV I2C_DEV(1)
69
#define SI70XX_PARAM_ADDR (0x70)
70
#define SI70XX_SAUL_INFO { .name = "si7034" }
71
77
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
78
#define SDCARD_SPI_PARAM_CS GPIO_PIN(PORT_E, 11)
79
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PORT_E, 2)
80
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PORT_E, 6)
81
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PORT_E, 5)
82
88
#define UB_PWRON_PIN GPIO_PIN(PORT_E, 14)
89
#define UB_M_RST_PIN GPIO_PIN(PORT_B, 5)
90
#define M_GPIO2_PIN GPIO_PIN(PORT_D, 1)
91
#define M_GPIO3_PIN GPIO_PIN(PORT_B, 4)
92
#define GPS_RST_PIN GPIO_PIN(PORT_C, 10)
/* Not connected */
93
98
void
board_init
(
void
);
99
100
#ifdef __cplusplus
101
}
102
#endif
103
104
#endif
/* BOARD_H */
105
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17