Loading...
Searching...
No Matches
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
19#ifndef BOARD_H
20#define BOARD_H
21
22#include "cpu.h"
23#include "board_common.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#define LED0_PIN GPIO_PIN(1, 1)
34#define LED0_MASK (1 << 1)
35#define LED0_ON (NRF_P1->OUTSET = LED0_MASK)
36#define LED0_OFF (NRF_P1->OUTCLR = LED0_MASK)
37#define LED0_TOGGLE (NRF_P1->OUT ^= LED0_MASK)
44#define BTN0_PIN GPIO_PIN(1, 2)
45#define BTN0_MODE GPIO_IN_PU
47#define BTN1_PIN GPIO_PIN(1, 10)
48#define BTN1_MODE GPIO_IN_PU
55#define APDS99XX_PARAM_DEV I2C_DEV(1)
56#define APDS99XX_PARAM_INT_PIN GPIO_PIN(0, 9)
63#define BMX280_PARAM_I2C_DEV I2C_DEV(1)
70#define LIS3MDL_PARAM_I2C I2C_DEV(1)
71#define LIS3MDL_PARAM_ADDR (0x1C)
78#define SHT3X_PARAM_I2C_DEV I2C_DEV(1)
79#define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_1)
86#define SPKR_PIN GPIO_PIN(1, 0)
93#define BACKLIGHT_PIN GPIO_PIN(1, 5)
94#define BACKLIGHT_MASK (1 << 5)
95#define BACKLIGHT_ON (NRF_P1->OUTSET = BACKLIGHT_MASK)
96#define BACKLIGHT_OFF (NRF_P1->OUTCLR = BACKLIGHT_MASK)
103#define ILI9341_PARAM_SPI SPI_DEV(1)
104#define ILI9341_PARAM_CS GPIO_PIN(0, 12)
105#define ILI9341_PARAM_DCX GPIO_PIN(0, 13)
106#define ILI9341_PARAM_RST GPIO_PIN(1, 3)
107#define ILI9341_PARAM_NUM_LINES (240U)
108#define ILI9341_PARAM_RGB (1)
109#define ILI9341_PARAM_INVERTED (1)
110#define ILI9341_PARAM_ROTATION (ILI9341_ROTATION_VERT)
111#define ILI9341_PARAM_OFFSET_X (80)
114#ifdef __cplusplus
115}
116#endif
117
118#endif /* BOARD_H */