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) 2019 Inria
3
* 2019 Freie Universität Berlin
4
* 2019 Kaspar Schleiser <kaspar@schleiser.de>
5
*
6
* This file is subject to the terms and conditions of the GNU Lesser
7
* General Public License v2.1. See the file LICENSE in the top level
8
* directory for more details.
9
*/
10
11
#pragma once
12
23
#include "cpu.h"
24
#include "board_common.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define LCD_RS GPIO_PIN(0, 18)
35
#define LCD_DET GPIO_PIN(0, 9)
36
#define LCD_CS GPIO_PIN(0, 25)
37
#define LCD_RESET GPIO_PIN(0, 26)
38
39
#define LCD_BACKLIGHT_LOW GPIO_PIN(0, 14)
40
#define LCD_BACKLIGHT_MID GPIO_PIN(0, 22)
41
#define LCD_BACKLIGHT_HIGH GPIO_PIN(0, 23)
42
43
#define BUTTON0_ENABLE GPIO_PIN(0, 13)
44
#define BUTTON0 GPIO_PIN(0, 15)
45
#define VIBRATOR GPIO_PIN(0, 16)
46
47
#define VCC33 GPIO_PIN(0, 24)
48
#define POWER_PRESENCE GPIO_PIN(0, 19)
49
#define CHARGING_ACTIVE GPIO_PIN(0, 12)
50
#define BATTERY_ADC NRF52_AIN7
57
#ifndef BACKLIGHT_MASK
58
#define BACKLIGHT_MASK (1 << 14)
59
#endif
60
#define BACKLIGHT_ON (NRF_P0->OUTCLR = BACKLIGHT_MASK)
61
#define BACKLIGHT_OFF (NRF_P0->OUTSET = BACKLIGHT_MASK)
68
#define ILI9341_PARAM_SPI SPI_DEV(0)
69
#define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
70
#define ILI9341_PARAM_SPI_MODE SPI_MODE_3
71
#define ILI9341_PARAM_CS LCD_CS
72
#define ILI9341_PARAM_DCX LCD_RS
73
#define ILI9341_PARAM_RST LCD_RESET
74
#define ILI9341_PARAM_RGB 1
75
#define ILI9341_PARAM_INVERTED 1
76
#define ILI9341_PARAM_NUM_LINES 240U
77
#define ILI9341_PARAM_ROTATION ILI9341_ROTATION_HORZ_FLIP
84
#define PINETIME_NOR_PAGE_SIZE (256)
85
#define PINETIME_NOR_PAGES_PER_SECTOR (16)
86
#define PINETIME_NOR_SECTOR_COUNT (2048)
87
#define PINETIME_NOR_FLAGS (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
88
#define PINETIME_NOR_SPI_DEV SPI_DEV(0)
89
#define PINETIME_NOR_SPI_CLK SPI_CLK_10MHZ
90
#define PINETIME_NOR_SPI_CS GPIO_PIN(0, 5)
91
#define PINETIME_NOR_SPI_MODE SPI_MODE_3
98
#define MTD_0 mtd_dev_get(0)
105
#define CST816S_PARAM_I2C_DEV I2C_DEV(0)
106
#define CST816S_PARAM_I2C_ADDR (0x15)
107
#define CST816S_PARAM_IRQ GPIO_PIN(0, 28)
108
#define CST816S_PARAM_IRQ_FLANK GPIO_FALLING
109
#define CST816S_PARAM_RESET GPIO_PIN(0, 10)
112
#ifdef __cplusplus
113
}
114
#endif
115
Generated on Mon Jun 30 2025 14:58:00 by
1.9.1