All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
board.h File Reference

Board specific configuration for the PineTime. More...

Detailed Description

Board specific configuration for the PineTime.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file board.h.

#include "cpu.h"
#include "board_common.h"
+ Include dependency graph for board.h:

Go to the source code of this file.

GPIO pin defines

#define LCD_RS   GPIO_PIN(0, 18)
 
#define LCD_DET   GPIO_PIN(0, 9)
 
#define LCD_CS   GPIO_PIN(0, 25)
 
#define LCD_RESET   GPIO_PIN(0, 26)
 
#define LCD_BACKLIGHT_LOW   GPIO_PIN(0, 14)
 
#define LCD_BACKLIGHT_MID   GPIO_PIN(0, 22)
 
#define LCD_BACKLIGHT_HIGH   GPIO_PIN(0, 23)
 
#define BUTTON0_ENABLE   GPIO_PIN(0, 13)
 
#define BUTTON0   GPIO_PIN(0, 15)
 
#define VIBRATOR   GPIO_PIN(0, 16)
 
#define VCC33   GPIO_PIN(0, 24)
 
#define POWER_PRESENCE   GPIO_PIN(0, 19)
 
#define CHARGING_ACTIVE   GPIO_PIN(0, 12)
 
#define BATTERY_ADC   NRF52_AIN7
 

Backlight control defines, default uses LCD_BACKLIGHT_LOW values

#define BACKLIGHT_MASK   (1 << 14)
 
#define BACKLIGHT_ON   (NRF_P0->OUTCLR = BACKLIGHT_MASK)
 
#define BACKLIGHT_OFF   (NRF_P0->OUTSET = BACKLIGHT_MASK)
 

LCD configuration

#define ILI9341_PARAM_SPI   SPI_DEV(0)
 
#define ILI9341_PARAM_SPI_CLK   SPI_CLK_10MHZ
 
#define ILI9341_PARAM_SPI_MODE   SPI_MODE_3
 
#define ILI9341_PARAM_CS   LCD_CS
 
#define ILI9341_PARAM_DCX   LCD_RS
 
#define ILI9341_PARAM_RST   LCD_RESET
 
#define ILI9341_PARAM_RGB   1
 
#define ILI9341_PARAM_INVERTED   1
 
#define ILI9341_PARAM_NUM_LINES   240U
 
#define ILI9341_PARAM_ROTATION   ILI9341_ROTATION_HORZ_FLIP
 

PineTime NOR flash hardware configuration

#define PINETIME_NOR_PAGE_SIZE   (256)
 
#define PINETIME_NOR_PAGES_PER_SECTOR   (16)
 
#define PINETIME_NOR_SECTOR_COUNT   (2048)
 
#define PINETIME_NOR_FLAGS   (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
 
#define PINETIME_NOR_SPI_DEV   SPI_DEV(0)
 
#define PINETIME_NOR_SPI_CLK   SPI_CLK_10MHZ
 
#define PINETIME_NOR_SPI_CS   GPIO_PIN(0, 5)
 
#define PINETIME_NOR_SPI_MODE   SPI_MODE_3
 

MTD configuration

#define MTD_0   mtd_dev_get(0)
 

Touch screen configuration

#define CST816S_PARAM_I2C_DEV   I2C_DEV(0)
 
#define CST816S_PARAM_I2C_ADDR   (0x15)
 
#define CST816S_PARAM_IRQ   GPIO_PIN(0, 28)
 
#define CST816S_PARAM_IRQ_FLANK   GPIO_FALLING
 
#define CST816S_PARAM_RESET   GPIO_PIN(0, 10)
 

Macro Definition Documentation

◆ BACKLIGHT_MASK

#define BACKLIGHT_MASK   (1 << 14)

Definition at line 59 of file board.h.

◆ BACKLIGHT_OFF

#define BACKLIGHT_OFF   (NRF_P0->OUTSET = BACKLIGHT_MASK)

Definition at line 62 of file board.h.

◆ BACKLIGHT_ON

#define BACKLIGHT_ON   (NRF_P0->OUTCLR = BACKLIGHT_MASK)

Definition at line 61 of file board.h.

◆ BATTERY_ADC

#define BATTERY_ADC   NRF52_AIN7

Definition at line 51 of file board.h.

◆ BUTTON0

#define BUTTON0   GPIO_PIN(0, 15)

Definition at line 45 of file board.h.

◆ BUTTON0_ENABLE

#define BUTTON0_ENABLE   GPIO_PIN(0, 13)

Definition at line 44 of file board.h.

◆ CHARGING_ACTIVE

#define CHARGING_ACTIVE   GPIO_PIN(0, 12)

Definition at line 50 of file board.h.

◆ CST816S_PARAM_I2C_ADDR

#define CST816S_PARAM_I2C_ADDR   (0x15)

Definition at line 107 of file board.h.

◆ CST816S_PARAM_I2C_DEV

#define CST816S_PARAM_I2C_DEV   I2C_DEV(0)

Definition at line 106 of file board.h.

◆ CST816S_PARAM_IRQ

#define CST816S_PARAM_IRQ   GPIO_PIN(0, 28)

Definition at line 108 of file board.h.

◆ CST816S_PARAM_IRQ_FLANK

#define CST816S_PARAM_IRQ_FLANK   GPIO_FALLING

Definition at line 109 of file board.h.

◆ CST816S_PARAM_RESET

#define CST816S_PARAM_RESET   GPIO_PIN(0, 10)

Definition at line 110 of file board.h.

◆ ILI9341_PARAM_CS

#define ILI9341_PARAM_CS   LCD_CS

Definition at line 72 of file board.h.

◆ ILI9341_PARAM_DCX

#define ILI9341_PARAM_DCX   LCD_RS

Definition at line 73 of file board.h.

◆ ILI9341_PARAM_INVERTED

#define ILI9341_PARAM_INVERTED   1

Definition at line 76 of file board.h.

◆ ILI9341_PARAM_NUM_LINES

#define ILI9341_PARAM_NUM_LINES   240U

Definition at line 77 of file board.h.

◆ ILI9341_PARAM_RGB

#define ILI9341_PARAM_RGB   1

Definition at line 75 of file board.h.

◆ ILI9341_PARAM_ROTATION

#define ILI9341_PARAM_ROTATION   ILI9341_ROTATION_HORZ_FLIP

Definition at line 78 of file board.h.

◆ ILI9341_PARAM_RST

#define ILI9341_PARAM_RST   LCD_RESET

Definition at line 74 of file board.h.

◆ ILI9341_PARAM_SPI

#define ILI9341_PARAM_SPI   SPI_DEV(0)

Definition at line 69 of file board.h.

◆ ILI9341_PARAM_SPI_CLK

#define ILI9341_PARAM_SPI_CLK   SPI_CLK_10MHZ

Definition at line 70 of file board.h.

◆ ILI9341_PARAM_SPI_MODE

#define ILI9341_PARAM_SPI_MODE   SPI_MODE_3

Definition at line 71 of file board.h.

◆ LCD_BACKLIGHT_HIGH

#define LCD_BACKLIGHT_HIGH   GPIO_PIN(0, 23)

Definition at line 42 of file board.h.

◆ LCD_BACKLIGHT_LOW

#define LCD_BACKLIGHT_LOW   GPIO_PIN(0, 14)

Definition at line 40 of file board.h.

◆ LCD_BACKLIGHT_MID

#define LCD_BACKLIGHT_MID   GPIO_PIN(0, 22)

Definition at line 41 of file board.h.

◆ LCD_CS

#define LCD_CS   GPIO_PIN(0, 25)

Definition at line 37 of file board.h.

◆ LCD_DET

#define LCD_DET   GPIO_PIN(0, 9)

Definition at line 36 of file board.h.

◆ LCD_RESET

#define LCD_RESET   GPIO_PIN(0, 26)

Definition at line 38 of file board.h.

◆ LCD_RS

#define LCD_RS   GPIO_PIN(0, 18)

Definition at line 35 of file board.h.

◆ MTD_0

#define MTD_0   mtd_dev_get(0)

Definition at line 99 of file board.h.

◆ PINETIME_NOR_FLAGS

#define PINETIME_NOR_FLAGS   (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)

Definition at line 88 of file board.h.

◆ PINETIME_NOR_PAGE_SIZE

#define PINETIME_NOR_PAGE_SIZE   (256)

Definition at line 85 of file board.h.

◆ PINETIME_NOR_PAGES_PER_SECTOR

#define PINETIME_NOR_PAGES_PER_SECTOR   (16)

Definition at line 86 of file board.h.

◆ PINETIME_NOR_SECTOR_COUNT

#define PINETIME_NOR_SECTOR_COUNT   (2048)

Definition at line 87 of file board.h.

◆ PINETIME_NOR_SPI_CLK

#define PINETIME_NOR_SPI_CLK   SPI_CLK_10MHZ

Definition at line 90 of file board.h.

◆ PINETIME_NOR_SPI_CS

#define PINETIME_NOR_SPI_CS   GPIO_PIN(0, 5)

Definition at line 91 of file board.h.

◆ PINETIME_NOR_SPI_DEV

#define PINETIME_NOR_SPI_DEV   SPI_DEV(0)

Definition at line 89 of file board.h.

◆ PINETIME_NOR_SPI_MODE

#define PINETIME_NOR_SPI_MODE   SPI_MODE_3

Definition at line 92 of file board.h.

◆ POWER_PRESENCE

#define POWER_PRESENCE   GPIO_PIN(0, 19)

Definition at line 49 of file board.h.

◆ VCC33

#define VCC33   GPIO_PIN(0, 24)

Definition at line 48 of file board.h.

◆ VIBRATOR

#define VIBRATOR   GPIO_PIN(0, 16)

Definition at line 46 of file board.h.