config.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _BOARD_CONFIG_H_
  2. #define _BOARD_CONFIG_H_
  3. // Taiji Pi S3 Board configuration
  4. #include <driver/gpio.h>
  5. #include <driver/spi_master.h>
  6. #define AUDIO_INPUT_SAMPLE_RATE 24000
  7. #define AUDIO_OUTPUT_SAMPLE_RATE 24000
  8. #define AUDIO_DEFAULT_OUTPUT_VOLUME 80
  9. #define AUDIO_I2S_GPIO_MCLK GPIO_NUM_21
  10. #define AUDIO_I2S_GPIO_WS GPIO_NUM_16
  11. #define AUDIO_I2S_GPIO_BCLK GPIO_NUM_18
  12. #define AUDIO_I2S_GPIO_DIN GPIO_NUM_NC
  13. #define AUDIO_I2S_GPIO_DOUT GPIO_NUM_17
  14. #define AUDIO_MUTE_PIN GPIO_NUM_48 // 低电平静音
  15. #define AUDIO_MIC_WS_PIN GPIO_NUM_45
  16. #define AUDIO_MIC_SD_PIN GPIO_NUM_46
  17. #define AUDIO_MIC_SCK_PIN GPIO_NUM_42
  18. #define DISPLAY_WIDTH 360
  19. #define DISPLAY_HEIGHT 360
  20. #define DISPLAY_MIRROR_X false
  21. #define DISPLAY_MIRROR_Y false
  22. #define DISPLAY_SWAP_XY false
  23. #define QSPI_LCD_H_RES (360)
  24. #define QSPI_LCD_V_RES (360)
  25. #define QSPI_LCD_BIT_PER_PIXEL (16)
  26. #define QSPI_LCD_HOST SPI2_HOST
  27. #define QSPI_PIN_NUM_LCD_PCLK GPIO_NUM_9
  28. #define QSPI_PIN_NUM_LCD_CS GPIO_NUM_10
  29. #define QSPI_PIN_NUM_LCD_DATA0 GPIO_NUM_11
  30. #define QSPI_PIN_NUM_LCD_DATA1 GPIO_NUM_12
  31. #define QSPI_PIN_NUM_LCD_DATA2 GPIO_NUM_13
  32. #define QSPI_PIN_NUM_LCD_DATA3 GPIO_NUM_14
  33. #define QSPI_PIN_NUM_LCD_RST GPIO_NUM_47
  34. #define QSPI_PIN_NUM_LCD_BL GPIO_NUM_15
  35. #define DISPLAY_OFFSET_X 0
  36. #define DISPLAY_OFFSET_Y 0
  37. #define TP_PORT (I2C_NUM_1)
  38. #define TP_PIN_NUM_TP_SDA (GPIO_NUM_7)
  39. #define TP_PIN_NUM_TP_SCL (GPIO_NUM_8)
  40. #define TP_PIN_NUM_TP_RST (GPIO_NUM_40)
  41. #define TP_PIN_NUM_TP_INT (GPIO_NUM_41)
  42. #define DISPLAY_BACKLIGHT_PIN QSPI_PIN_NUM_LCD_BL
  43. #define DISPLAY_BACKLIGHT_OUTPUT_INVERT false
  44. #define TAIJIPI_ST77916_PANEL_BUS_QSPI_CONFIG(sclk, d0, d1, d2, d3, max_trans_sz) \
  45. { \
  46. .data0_io_num = d0, \
  47. .data1_io_num = d1, \
  48. .sclk_io_num = sclk, \
  49. .data2_io_num = d2, \
  50. .data3_io_num = d3, \
  51. .max_transfer_sz = max_trans_sz, \
  52. }
  53. #endif // _BOARD_CONFIG_H_