38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include "driver/spi_common.h"
|
|
#include "driver/i2c.h"
|
|
#include "driver/gpio.h"
|
|
|
|
// I2C
|
|
#define CORE2_I2C_PIN_SDA 21
|
|
#define CORE2_I2C_PIN_SCL 22
|
|
|
|
// SPI2 - Display, SD
|
|
#define CORE2_SPI2_PIN_SCLK GPIO_NUM_18
|
|
#define CORE2_SPI2_PIN_MOSI GPIO_NUM_23
|
|
#define CORE2_SPI2_PIN_MISO GPIO_NUM_38
|
|
#define CORE2_SPI2_TRANSACTION_LIMIT CORE2_LCD_DRAW_BUFFER_SIZE
|
|
|
|
// Display
|
|
#define CORE2_LCD_SPI_HOST SPI2_HOST
|
|
#define CORE2_LCD_HORIZONTAL_RESOLUTION 320
|
|
#define CORE2_LCD_VERTICAL_RESOLUTION 240
|
|
#define CORE2_LCD_BITS_PER_PIXEL 16
|
|
#define CORE2_LCD_DRAW_BUFFER_HEIGHT (CORE2_LCD_VERTICAL_RESOLUTION / 10)
|
|
#define CORE2_LCD_DRAW_BUFFER_SIZE (CORE2_LCD_HORIZONTAL_RESOLUTION * CORE2_LCD_DRAW_BUFFER_HEIGHT * (CORE2_LCD_BITS_PER_PIXEL / 8))
|
|
#define CORE2_LCD_PIN_CS GPIO_NUM_5
|
|
#define CORE2_LCD_PIN_DC GPIO_NUM_15
|
|
|
|
// Touch
|
|
#define CORE2_TOUCH_I2C_PORT I2C_NUM_0
|
|
|
|
// SD Card
|
|
#define CORE2_SDCARD_SPI_HOST SPI2_HOST
|
|
#define CORE2_SDCARD_PIN_CS GPIO_NUM_4
|
|
#define CORE2_SDCARD_SPI_FREQUENCY 800000U
|
|
#define CORE2_SDCARD_FORMAT_ON_MOUNT_FAILED false
|
|
#define CORE2_SDCARD_MAX_OPEN_FILES 4
|
|
#define CORE2_SDCARD_ALLOC_UNIT_SIZE (16 * 1024)
|
|
#define CORE2_SDCARD_STATUS_CHECK_ENABLED false
|