/ src / config / custom_m2.h
custom_m2.h
 1  #pragma once
 2  
 3  /** SPI configurations, used for MicroSD Card on the Dock */
 4  // Pins are defined in nrf52840_m2.h
 5  #define APP_SDCARD_SPI_INSTANCE			0
 6  
 7  /** SPI configurations, used for ILI9341 TFT controller */
 8  #define ILI9341_SCK_PIN					NRF_GPIO_PIN_MAP(0, 21)
 9  #define ILI9341_MISO_PIN				NRF_GPIO_PIN_MAP(0, 24)
10  #define ILI9341_MOSI_PIN				NRF_GPIO_PIN_MAP(0, 4)
11  #define ILI9341_SS_PIN					NRF_GPIO_PIN_MAP(0, 26)
12  #define ILI9341_DC_PIN					NRF_GPIO_PIN_MAP(0, 20)
13  #define ILI9341_RESET_PIN				NRF_GPIO_PIN_MAP(0, 27)
14  #define ILI9341_BACKLIGHT_CONTROL_PIN	NRF_GPIO_PIN_MAP(0, 23)
15  #define ILI9341_HEIGHT					320
16  #define ILI9341_WIDTH					240
17  #define ILI9341_SPI_INSTANCE			3
18  
19  /** GPIO configurations, used for user input */
20  #define INPUT_BUTTON_UP_PIN				NRF_GPIO_PIN_MAP(1, 7)
21  #define INPUT_BUTTON_DOWN_PIN			NRF_GPIO_PIN_MAP(1, 4)
22  #define INPUT_BUTTON_LEFT_PIN			NRF_GPIO_PIN_MAP(1, 3)
23  #define INPUT_BUTTON_RIGHT_PIN			NRF_GPIO_PIN_MAP(1, 2)
24  #define INPUT_BUTTON_CENTER_PIN			NRF_GPIO_PIN_MAP(1, 1)
25  #define INPUT_BUTTON_EX1_PIN			NRF_GPIO_PIN_MAP(1, 0)
26  #define INPUT_BUTTON_EX2_PIN			0xFF // none
27  
28  /** UART configurations, used for logging */
29  #define NRF_LOG_BACKEND_UART_TX_PIN		16