mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-18 17:35:05 +00:00
96 lines
2.5 KiB
C
96 lines
2.5 KiB
C
// From https://github.com/Xinyuan-LilyGO/T-Deck-Pro/blob/master/examples/test_lvgl/utilities.h
|
|
|
|
#pragma once
|
|
|
|
#define BOARD_I2C_ADDR_TOUCH 0x1A // Touch --- CST328
|
|
#define BOARD_I2C_ADDR_LTR_553ALS 0x23 // Light sensor --- LTR_553ALS
|
|
#define BOARD_I2C_ADDR_GYROSCOPDE 0x28 // Gyroscope --- BHI260AP
|
|
#define BOARD_I2C_ADDR_KEYBOARD 0x34 // Keyboard --- TCA8418
|
|
#define BOARD_I2C_ADDR_PMU_SY6970 0x6A // PMU --- SY6970
|
|
|
|
// IIC
|
|
#define BOARD_I2C_SDA 13
|
|
#define BOARD_I2C_SCL 14
|
|
|
|
// Keyboard
|
|
#define BOARD_KEYBOARD_SCL BOARD_I2C_SCL
|
|
#define BOARD_KEYBOARD_SDA BOARD_I2C_SDA
|
|
#define BOARD_KEYBOARD_INT 15
|
|
#define BOARD_KEYBOARD_LED 42
|
|
|
|
// Touch
|
|
#define BOARD_TOUCH_SCL BOARD_I2C_SCL
|
|
#define BOARD_TOUCH_SDA BOARD_I2C_SDA
|
|
#define BOARD_TOUCH_INT 12
|
|
#define BOARD_TOUCH_RST 45
|
|
|
|
// LTR-553ALS-WA beam sensor
|
|
#define BOARD_ALS_SCL BOARD_I2C_SCL
|
|
#define BOARD_ALS_SDA BOARD_I2C_SDA
|
|
#define BOARD_ALS_INT 16
|
|
|
|
// Gyroscope
|
|
#define BOARD_GYROSCOPDE_SCL BOARD_I2C_SCL
|
|
#define BOARD_GYROSCOPDE_SDA BOARD_I2C_SDA
|
|
#define BOARD_GYROSCOPDE_INT 21
|
|
#define BOARD_GYROSCOPDE_RST -1
|
|
|
|
// SPI
|
|
#define BOARD_SPI_SCK 36
|
|
#define BOARD_SPI_MOSI 33
|
|
#define BOARD_SPI_MISO 47
|
|
#define BOARD_SPI_HOST SPI2_HOST
|
|
|
|
// Display
|
|
#define BOARD_EPD_SCK BOARD_SPI_SCK
|
|
#define BOARD_EPD_MOSI BOARD_SPI_MOSI
|
|
#define BOARD_EPD_SPI_HOST BOARD_SPI_HOST
|
|
#define BOARD_EPD_DC 35
|
|
#define BOARD_EPD_CS 34
|
|
#define BOARD_EPD_BUSY 37
|
|
|
|
// SD card
|
|
#define BOARD_SD_CS 48
|
|
#define BOARD_SD_SCK BOARD_SPI_SCK
|
|
#define BOARD_SD_MOSI BOARD_SPI_MOSI
|
|
#define BOARD_SD_MISO BOARD_SPI_MISO
|
|
#define BOARD_SD_SPI_HOST BOARD_SPI_HOST
|
|
|
|
// Lora
|
|
#define BOARD_LORA_SCK BOARD_SPI_SCK
|
|
#define BOARD_LORA_MOSI BOARD_SPI_MOSI
|
|
#define BOARD_LORA_MISO BOARD_SPI_MISO
|
|
#define BOARD_LORA_SPI_HOST BOARD_SPI_HOST
|
|
#define BOARD_LORA_CS 3
|
|
#define BOARD_LORA_BUSY 6
|
|
#define BOARD_LORA_RST 4
|
|
#define BOARD_LORA_INT 5
|
|
|
|
// GPS
|
|
#define BOARD_GPS_RXD 44
|
|
#define BOARD_GPS_TXD 43
|
|
#define BOARD_GPS_PPS 1
|
|
|
|
// A7682E Modem
|
|
#define BOARD_A7682E_RI 7
|
|
#define BOARD_A7682E_ITR 8
|
|
#define BOARD_A7682E_RST 9
|
|
#define BOARD_A7682E_RXD 10
|
|
#define BOARD_A7682E_TXD 11
|
|
#define BOARD_A7682E_PWRKEY 40
|
|
|
|
// Boot pin
|
|
#define BOARD_BOOT_PIN 0
|
|
|
|
// Motor pin
|
|
#define BOARD_MOTOR_PIN 2
|
|
|
|
// EN
|
|
#define BOARD_GPS_EN 39 // enable GPS module
|
|
#define BOARD_1V8_EN 38 // enable gyroscope module
|
|
#define BOARD_6609_EN 41 // enable 7682 module
|
|
#define BOARD_LORA_EN 46 // enable LORA module
|
|
|
|
// Mic
|
|
#define BOARD_MIC_DATA 17
|
|
#define BOARD_MIC_CLOCK 18 |