custom_pitaya_go.h
1 #pragma once 2 3 /** SPI configurations, used for MicroSD Card on the Display */ 4 #define SDC_SCK_PIN NRF_GPIO_PIN_MAP(0, 16) ///< SDC serial clock (SCK) pin. 5 #define SDC_MOSI_PIN NRF_GPIO_PIN_MAP(0, 14) ///< SDC serial data in (DI) pin. 6 #define SDC_MISO_PIN NRF_GPIO_PIN_MAP(0, 15) ///< SDC serial data out (DO) pin. 7 #define SDC_CS_PIN NRF_GPIO_PIN_MAP(0, 13) ///< SDC chip select (CS) pin. 8 #define APP_SDCARD_SPI_INSTANCE 0 9 10 /** SPI configurations, used for ILI9341 TFT controller */ 11 #define ILI9341_SCK_PIN NRF_GPIO_PIN_MAP(0, 21) 12 #define ILI9341_MISO_PIN NRF_GPIO_PIN_MAP(0, 17) 13 #define ILI9341_MOSI_PIN NRF_GPIO_PIN_MAP(0, 22) 14 #define ILI9341_SS_PIN NRF_GPIO_PIN_MAP(0, 25) 15 #define ILI9341_DC_PIN NRF_GPIO_PIN_MAP(0, 23) 16 #define ILI9341_RESET_PIN NRF_GPIO_PIN_MAP(0, 24) 17 #define ILI9341_BACKLIGHT_CONTROL_PIN NRF_GPIO_PIN_MAP(0, 20) 18 #define ILI9341_HEIGHT 320 19 #define ILI9341_WIDTH 240 20 #define ILI9341_SPI_INSTANCE 3 21 22 /** GPIO configurations, used for user input */ 23 #define INPUT_BUTTON_UP_PIN NRF_GPIO_PIN_MAP(0, 28) 24 #define INPUT_BUTTON_DOWN_PIN NRF_GPIO_PIN_MAP(0, 3) 25 #define INPUT_BUTTON_LEFT_PIN NRF_GPIO_PIN_MAP(0, 5) 26 #define INPUT_BUTTON_RIGHT_PIN NRF_GPIO_PIN_MAP(0, 29) 27 #define INPUT_BUTTON_CENTER_PIN NRF_GPIO_PIN_MAP(0, 4) 28 #define INPUT_BUTTON_EX1_PIN NRF_GPIO_PIN_MAP(0, 31) 29 #define INPUT_BUTTON_EX2_PIN NRF_GPIO_PIN_MAP(0, 30) 30 31 /** UART configurations, used for logging */ 32 #define NRF_LOG_BACKEND_UART_TX_PIN 26 33 34 #define DISPLAY_LED_LOW_POWER_PWM_ENABLED 1 35 36 /** APA102 RGB LED*/ 37 #define DISPLAY_LED_APA102_ENABLED 1 38 #define DISPLAY_LED_APA102_SPIM_INSTANCE 2 39 #define DISPLAY_LED_APA102_SCK_PIN NRF_GPIO_PIN_MAP(0, 26) 40 #define DISPLAY_LED_APA102_MOSI_PIN NRF_GPIO_PIN_MAP(0, 27) 41 #define DISPLAY_LED_APA102_COLOR_ORDER DISPLAY_LED_RGB_COLOR_ORDER_RBG 42 43 // APA102 shares pins with the log UART, can only have one. 44 #if defined(DISPLAY_LED_APA102_ENABLED) && DISPLAY_LED_APA102_ENABLED == 1 45 #define NRF_LOG_BACKEND_UART_ENABLED 0 46 #endif // DISPLAY_LED_APA102_ENABLED