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
21
#ifndef BOARD_H
22
#define BOARD_H
23
24
#include "cpu.h"
25
#include "board_common.h"
26
#include "mtd.h"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
36
#define LCD_RS GPIO_PIN(0, 18)
37
#define LCD_DET GPIO_PIN(0, 9)
38
#define LCD_CS GPIO_PIN(0, 25)
39
#define LCD_RESET GPIO_PIN(0, 26)
40
41
#define LCD_BACKLIGHT_LOW GPIO_PIN(0, 14)
42
#define LCD_BACKLIGHT_MID GPIO_PIN(0, 22)
43
#define LCD_BACKLIGHT_HIGH GPIO_PIN(0, 23)
44
45
#define BUTTON0_ENABLE GPIO_PIN(0, 13)
46
#define BUTTON0 GPIO_PIN(0, 15)
47
#define VIBRATOR GPIO_PIN(0, 16)
48
49
#define VCC33 GPIO_PIN(0, 24)
50
#define POWER_PRESENCE GPIO_PIN(0, 19)
51
#define CHARGING_ACTIVE GPIO_PIN(0, 12)
52
#define BATTERY_ADC NRF52_AIN7
53
59
#ifndef BACKLIGHT_MASK
60
#define BACKLIGHT_MASK (1 << 14)
61
#endif
62
#define BACKLIGHT_ON (NRF_P0->OUTCLR = BACKLIGHT_MASK)
63
#define BACKLIGHT_OFF (NRF_P0->OUTSET = BACKLIGHT_MASK)
64
70
#define ILI9341_PARAM_SPI SPI_DEV(0)
71
#define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
72
#define ILI9341_PARAM_SPI_MODE SPI_MODE_3
73
#define ILI9341_PARAM_CS LCD_CS
74
#define ILI9341_PARAM_DCX LCD_RS
75
#define ILI9341_PARAM_RST LCD_RESET
76
#define ILI9341_PARAM_RGB 1
77
#define ILI9341_PARAM_INVERTED 1
78
#define ILI9341_PARAM_NUM_LINES 240U
79
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
93
99
extern
mtd_dev_t
*
mtd0
;
100
#define MTD_0 mtd0
101
103
#ifdef __cplusplus
104
}
105
#endif
106
107
#endif
/* BOARD_H */
108
mtd_dev_t
MTD device descriptor.
Definition:
mtd.h:58
mtd0
mtd_dev_t * mtd0
mtd flash emulation device
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17