config.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #ifndef _BOARD_CONFIG_H_
  2. #define _BOARD_CONFIG_H_
  3. #include <driver/gpio.h>
  4. #include <driver/uart.h>
  5. #include <driver/spi_master.h>
  6. #define AUDIO_INPUT_SAMPLE_RATE 24000
  7. #define AUDIO_OUTPUT_SAMPLE_RATE 24000
  8. #define AUDIO_INPUT_REFERENCE true
  9. #define CORDEC_POWER_CTRL GPIO_NUM_48
  10. #define POWER_CTRL GPIO_NUM_9
  11. #define LED_G GPIO_NUM_43
  12. #define SD_MISO GPIO_NUM_17
  13. #define SD_SCK GPIO_NUM_16
  14. #define SD_MOSI GPIO_NUM_38
  15. #define AUDIO_I2S_GPIO_MCLK GPIO_NUM_42
  16. #define AUDIO_I2S_GPIO_WS GPIO_NUM_39
  17. #define AUDIO_I2S_GPIO_BCLK GPIO_NUM_40
  18. #define AUDIO_I2S_GPIO_DIN_1 GPIO_NUM_15
  19. #define AUDIO_I2S_GPIO_DIN_2 GPIO_NUM_3
  20. #define AUDIO_I2S_GPIO_DOUT GPIO_NUM_41
  21. #define AUDIO_CODEC_PA_PIN_1 GPIO_NUM_4
  22. #define AUDIO_CODEC_PA_PIN_2 GPIO_NUM_15
  23. #define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_2
  24. #define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_1
  25. #define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
  26. #define AUDIO_CODEC_ES7210_ADDR ES7210_CODEC_DEFAULT_ADDR
  27. #define BUILTIN_LED_GPIO GPIO_NUM_NC
  28. #define BOOT_BUTTON_GPIO GPIO_NUM_0
  29. #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC
  30. #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_NC
  31. #define DISPLAY_WIDTH 360
  32. #define DISPLAY_HEIGHT 360
  33. #define DISPLAY_MIRROR_X false
  34. #define DISPLAY_MIRROR_Y false
  35. #define DISPLAY_SWAP_XY false
  36. #define QSPI_LCD_H_RES (360)
  37. #define QSPI_LCD_V_RES (360)
  38. #define QSPI_LCD_BIT_PER_PIXEL (16)
  39. #define QSPI_LCD_HOST SPI2_HOST
  40. #define QSPI_PIN_NUM_LCD_PCLK GPIO_NUM_18
  41. #define QSPI_PIN_NUM_LCD_CS GPIO_NUM_14
  42. #define QSPI_PIN_NUM_LCD_DATA0 GPIO_NUM_46
  43. #define QSPI_PIN_NUM_LCD_DATA1 GPIO_NUM_13
  44. #define QSPI_PIN_NUM_LCD_DATA2 GPIO_NUM_11
  45. #define QSPI_PIN_NUM_LCD_DATA3 GPIO_NUM_12
  46. #define QSPI_PIN_NUM_LCD_RST_1 GPIO_NUM_3
  47. #define QSPI_PIN_NUM_LCD_RST_2 GPIO_NUM_47
  48. #define QSPI_PIN_NUM_LCD_BL GPIO_NUM_44
  49. #define UART1_TX_1 GPIO_NUM_6
  50. #define UART1_TX_2 GPIO_NUM_5
  51. #define UART1_RX_1 GPIO_NUM_5
  52. #define UART1_RX_2 GPIO_NUM_4
  53. #define TOUCH_PAD2_1 GPIO_NUM_NC
  54. #define TOUCH_PAD2_2 GPIO_NUM_6
  55. #define TOUCH_PAD1 GPIO_NUM_7
  56. #define DISPLAY_OFFSET_X 0
  57. #define DISPLAY_OFFSET_Y 0
  58. #define TP_PORT (I2C_NUM_1)
  59. #define TP_PIN_NUM_RST (GPIO_NUM_NC)
  60. #define TP_PIN_NUM_INT (GPIO_NUM_10)
  61. #define DISPLAY_BACKLIGHT_PIN QSPI_PIN_NUM_LCD_BL
  62. #define DISPLAY_BACKLIGHT_OUTPUT_INVERT false
  63. #define TAIJIPI_ST77916_PANEL_BUS_QSPI_CONFIG(sclk, d0, d1, d2, d3, max_trans_sz) \
  64. { \
  65. .data0_io_num = d0, \
  66. .data1_io_num = d1, \
  67. .sclk_io_num = sclk, \
  68. .data2_io_num = d2, \
  69. .data3_io_num = d3, \
  70. .max_transfer_sz = max_trans_sz, \
  71. }
  72. #endif // _BOARD_CONFIG_H_