42 lines
988 B
C
42 lines
988 B
C
#pragma once
|
|
|
|
/* KY-040 #1 (проверено по HB: CLK=GP2) */
|
|
#define PIN_ENC1_SW 0
|
|
#define PIN_ENC1_DT 1
|
|
#define PIN_ENC1_CLK 2
|
|
|
|
/* KY-040 #2 */
|
|
#define PIN_ENC2_CLK 3
|
|
#define PIN_ENC2_DT 4
|
|
#define PIN_ENC2_SW 5
|
|
|
|
/* Potentiometer wiper → ADC */
|
|
#define PIN_POT 26 /* ADC0 */
|
|
|
|
/*
|
|
* TPM408-2.8 (ILI9341 240x320) + shared SPI touch/SD:
|
|
* SCK → GP18
|
|
* SDI → GP19 (MOSI)
|
|
* SDO → GP16 (MISO, optional)
|
|
* CS → GP17 (LCD)
|
|
* DC → GP20
|
|
* RES → GP21
|
|
* LED → GP22
|
|
*
|
|
* MUST hold inactive (HIGH) or SPI bus fights the LCD → edge garbage:
|
|
* T_CS → GP6 (touch XPT2046 CS) — or tie to 3.3V if unused
|
|
* SD_CS → GP7 (microSD CS) — or tie to 3.3V if unused
|
|
*/
|
|
#define PIN_LCD_MISO 16
|
|
#define PIN_LCD_CS 17
|
|
#define PIN_LCD_SCK 18
|
|
#define PIN_LCD_MOSI 19
|
|
#define PIN_LCD_DC 20
|
|
#define PIN_LCD_RES 21
|
|
#define PIN_LCD_BL 22
|
|
|
|
#define PIN_TOUCH_CS 6
|
|
#define PIN_SD_CS 7
|
|
|
|
#define LCD_SPI_INST spi0
|