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) 2020 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
9
#pragma once
10
21
#include "cpu.h"
22
#include "board_common.h"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
32
#define LED0_PIN GPIO_PIN(1, 1)
33
#define LED0_MASK (1 << 1)
34
#define LED0_ON (NRF_P1->OUTSET = LED0_MASK)
35
#define LED0_OFF (NRF_P1->OUTCLR = LED0_MASK)
36
#define LED0_TOGGLE (NRF_P1->OUT ^= LED0_MASK)
43
#define BTN0_PIN GPIO_PIN(1, 2)
44
#define BTN0_MODE GPIO_IN_PU
46
#define BTN1_PIN GPIO_PIN(1, 10)
47
#define BTN1_MODE GPIO_IN_PU
54
#define APDS99XX_PARAM_DEV I2C_DEV(1)
55
#define APDS99XX_PARAM_INT_PIN GPIO_PIN(0, 9)
62
#define BMX280_PARAM_I2C_DEV I2C_DEV(1)
69
#define LIS3MDL_PARAM_I2C I2C_DEV(1)
70
#define LIS3MDL_PARAM_ADDR (0x1C)
77
#define SHT3X_PARAM_I2C_DEV I2C_DEV(1)
78
#define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_1)
85
#define SPKR_PIN GPIO_PIN(1, 0)
92
#define BACKLIGHT_PIN GPIO_PIN(1, 5)
93
#define BACKLIGHT_MASK (1 << 5)
94
#define BACKLIGHT_ON (NRF_P1->OUTSET = BACKLIGHT_MASK)
95
#define BACKLIGHT_OFF (NRF_P1->OUTCLR = BACKLIGHT_MASK)
102
#define ILI9341_PARAM_SPI SPI_DEV(1)
103
#define ILI9341_PARAM_CS GPIO_PIN(0, 12)
104
#define ILI9341_PARAM_DCX GPIO_PIN(0, 13)
105
#define ILI9341_PARAM_RST GPIO_PIN(1, 3)
106
#define ILI9341_PARAM_NUM_LINES (240U)
107
#define ILI9341_PARAM_RGB (1)
108
#define ILI9341_PARAM_INVERTED (1)
109
#define ILI9341_PARAM_ROTATION (ILI9341_ROTATION_VERT)
110
#define ILI9341_PARAM_OFFSET_X (80)
113
#ifdef __cplusplus
114
}
115
#endif
116
Generated on Fri Jun 20 2025 21:02:35 by
1.9.1