Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
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
21
#ifndef BOARD_H
22
#define BOARD_H
23
24
#include "cpu.h"
25
#include "board_common.h"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
35
#define LCD_RS GPIO_PIN(0, 18)
36
#define LCD_DET GPIO_PIN(0, 9)
37
#define LCD_CS GPIO_PIN(0, 25)
38
#define LCD_RESET GPIO_PIN(0, 26)
39
40
#define LCD_BACKLIGHT_LOW GPIO_PIN(0, 14)
41
#define LCD_BACKLIGHT_MID GPIO_PIN(0, 22)
42
#define LCD_BACKLIGHT_HIGH GPIO_PIN(0, 23)
43
44
#define BUTTON0_ENABLE GPIO_PIN(0, 13)
45
#define BUTTON0 GPIO_PIN(0, 15)
46
#define VIBRATOR GPIO_PIN(0, 16)
47
48
#define VCC33 GPIO_PIN(0, 24)
49
#define POWER_PRESENCE GPIO_PIN(0, 19)
50
#define CHARGING_ACTIVE GPIO_PIN(0, 12)
51
#define BATTERY_ADC NRF52_AIN7
58
#ifndef BACKLIGHT_MASK
59
#define BACKLIGHT_MASK (1 << 14)
60
#endif
61
#define BACKLIGHT_ON (NRF_P0->OUTCLR = BACKLIGHT_MASK)
62
#define BACKLIGHT_OFF (NRF_P0->OUTSET = BACKLIGHT_MASK)
69
#define ILI9341_PARAM_SPI SPI_DEV(0)
70
#define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
71
#define ILI9341_PARAM_SPI_MODE SPI_MODE_3
72
#define ILI9341_PARAM_CS LCD_CS
73
#define ILI9341_PARAM_DCX LCD_RS
74
#define ILI9341_PARAM_RST LCD_RESET
75
#define ILI9341_PARAM_RGB 1
76
#define ILI9341_PARAM_INVERTED 1
77
#define ILI9341_PARAM_NUM_LINES 240U
78
#define ILI9341_PARAM_ROTATION ILI9341_ROTATION_HORZ_FLIP
85
#define PINETIME_NOR_PAGE_SIZE (256)
86
#define PINETIME_NOR_PAGES_PER_SECTOR (16)
87
#define PINETIME_NOR_SECTOR_COUNT (2048)
88
#define PINETIME_NOR_FLAGS (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
89
#define PINETIME_NOR_SPI_DEV SPI_DEV(0)
90
#define PINETIME_NOR_SPI_CLK SPI_CLK_10MHZ
91
#define PINETIME_NOR_SPI_CS GPIO_PIN(0, 5)
92
#define PINETIME_NOR_SPI_MODE SPI_MODE_3
99
#define MTD_0 mtd_dev_get(0)
106
#define CST816S_PARAM_I2C_DEV I2C_DEV(0)
107
#define CST816S_PARAM_I2C_ADDR (0x15)
108
#define CST816S_PARAM_IRQ GPIO_PIN(0, 28)
109
#define CST816S_PARAM_IRQ_FLANK GPIO_FALLING
110
#define CST816S_PARAM_RESET GPIO_PIN(0, 10)
113
#ifdef __cplusplus
114
}
115
#endif
116
117
#endif
/* BOARD_H */
Generated on Sun Dec 22 2024 10:22:27 by
1.9.8