#ifndef _BOARD_CONFIG_H_
#define _BOARD_CONFIG_H_

#include <driver/gpio.h>

// 音频采样率
#define AUDIO_INPUT_SAMPLE_RATE 16000
#define AUDIO_OUTPUT_SAMPLE_RATE 16000
#define AUDIO_INPUT_REFERENCE    true

// I2S 引脚
#define AUDIO_I2S_GPIO_MCLK  GPIO_NUM_12
#define AUDIO_I2S_GPIO_WS    GPIO_NUM_38
#define AUDIO_I2S_GPIO_BCLK  GPIO_NUM_43
#define AUDIO_I2S_GPIO_DIN   GPIO_NUM_39
#define AUDIO_I2S_GPIO_DOUT  GPIO_NUM_21

// Audio Codec 相关
#define AUDIO_CODEC_PA_PIN       GPIO_NUM_11
#define AUDIO_CODEC_I2C_SDA_PIN  GPIO_NUM_47
#define AUDIO_CODEC_I2C_SCL_PIN  GPIO_NUM_48
#define AUDIO_CODEC_ES8311_ADDR  ES8311_CODEC_DEFAULT_ADDR
#define AUDIO_CODEC_ES7210_ADDR  ES7210_CODEC_DEFAULT_ADDR

#define HUB75_MIN_REFRESH_RATE 240
#define HUB75_PANEL_WIDTH   64
#define HUB75_PANEL_HEIGHT  64
#define HUB75_CHAIN_COLUMNS 1
#define HUB75_CHAIN_ROWS    1

#define HUB75_SCAN_WIRING   Hub75ScanWiring::STANDARD_TWO_SCAN
#define HUB75_SHIFT_DRIVER  Hub75ShiftDriver::FM6126A

#define HUB75_R1  GPIO_NUM_4
#define HUB75_G1  GPIO_NUM_5
#define HUB75_B1  GPIO_NUM_6
#define HUB75_R2  GPIO_NUM_7
#define HUB75_G2  GPIO_NUM_15
#define HUB75_B2  GPIO_NUM_16
#define HUB75_A   GPIO_NUM_18
#define HUB75_B   GPIO_NUM_8
#define HUB75_C   GPIO_NUM_3
#define HUB75_D   GPIO_NUM_42
#define HUB75_E   GPIO_NUM_9
#define HUB75_CLK GPIO_NUM_41
#define HUB75_LAT GPIO_NUM_40
#define HUB75_OE  GPIO_NUM_2

#define DISPLAY_WIDTH  (HUB75_PANEL_WIDTH * HUB75_CHAIN_COLUMNS)
#define DISPLAY_HEIGHT (HUB75_PANEL_HEIGHT * HUB75_CHAIN_ROWS)
#define LVGL_DMA_BUFF_LEN (DISPLAY_WIDTH * HUB75_PANEL_HEIGHT * 1)
#define LVGL_SPIRAM_BUFF_LEN (DISPLAY_WIDTH * DISPLAY_HEIGHT * 1)

#endif // _BOARD_CONFIG_H_
