Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2020 Inria
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
#include "cpu.h"
19
#include "board_common.h"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
29
#define LED0_PIN GPIO_PIN(1, 1)
30
#define LED0_MASK (1 << 1)
31
#define LED0_ON (NRF_P1->OUTSET = LED0_MASK)
32
#define LED0_OFF (NRF_P1->OUTCLR = LED0_MASK)
33
#define LED0_TOGGLE (NRF_P1->OUT ^= LED0_MASK)
40
#define BTN0_PIN GPIO_PIN(1, 2)
41
#define BTN0_MODE GPIO_IN_PU
43
#define BTN1_PIN GPIO_PIN(1, 10)
44
#define BTN1_MODE GPIO_IN_PU
51
#define APDS99XX_PARAM_DEV I2C_DEV(1)
52
#define APDS99XX_PARAM_INT_PIN GPIO_PIN(0, 9)
59
#define BMX280_PARAM_I2C_DEV I2C_DEV(1)
66
#define LIS3MDL_PARAM_I2C I2C_DEV(1)
67
#define LIS3MDL_PARAM_ADDR (0x1C)
74
#define SHT3X_PARAM_I2C_DEV I2C_DEV(1)
75
#define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_1)
82
#define SPKR_PIN GPIO_PIN(1, 0)
89
#define BACKLIGHT_PIN GPIO_PIN(1, 5)
90
#define BACKLIGHT_MASK (1 << 5)
91
#define BACKLIGHT_ON (NRF_P1->OUTSET = BACKLIGHT_MASK)
92
#define BACKLIGHT_OFF (NRF_P1->OUTCLR = BACKLIGHT_MASK)
99
#define ILI9341_PARAM_SPI SPI_DEV(1)
100
#define ILI9341_PARAM_CS GPIO_PIN(0, 12)
101
#define ILI9341_PARAM_DCX GPIO_PIN(0, 13)
102
#define ILI9341_PARAM_RST GPIO_PIN(1, 3)
103
#define ILI9341_PARAM_NUM_LINES (240U)
104
#define ILI9341_PARAM_RGB (1)
105
#define ILI9341_PARAM_INVERTED (1)
106
#define ILI9341_PARAM_ROTATION (ILI9341_ROTATION_VERT)
107
#define ILI9341_PARAM_OFFSET_X (80)
110
#ifdef __cplusplus
111
}
112
#endif
113
Generated on Thu Jul 24 2025 16:03:56 by
1.9.1