config.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef _BOARD_CONFIG_H_
  2. #define _BOARD_CONFIG_H_
  3. #include <driver/gpio.h>
  4. #define AUDIO_INPUT_SAMPLE_RATE 24000
  5. #define AUDIO_OUTPUT_SAMPLE_RATE 24000
  6. #define AUDIO_INPUT_REFERENCE true
  7. #define AUDIO_I2S_GPIO_MCLK GPIO_NUM_16
  8. #define AUDIO_I2S_GPIO_WS GPIO_NUM_45
  9. #define AUDIO_I2S_GPIO_BCLK GPIO_NUM_9
  10. #define AUDIO_I2S_GPIO_DIN GPIO_NUM_10
  11. #define AUDIO_I2S_GPIO_DOUT GPIO_NUM_8
  12. #define AUDIO_CODEC_PA_PIN GPIO_NUM_48
  13. #define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_17
  14. #define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_18
  15. #define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
  16. #define AUDIO_CODEC_ES7210_ADDR ES7210_CODEC_DEFAULT_ADDR
  17. #define BUILTIN_LED_GPIO GPIO_NUM_NC
  18. #define BOOT_BUTTON_GPIO GPIO_NUM_5
  19. #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC
  20. #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_NC
  21. #ifdef CONFIG_LCD_ST7789
  22. #define DISPLAY_SDA_PIN GPIO_NUM_NC
  23. #define DISPLAY_SCL_PIN GPIO_NUM_NC
  24. #define DISPLAY_WIDTH 280
  25. #define DISPLAY_HEIGHT 240
  26. #define DISPLAY_SWAP_XY true
  27. #define DISPLAY_MIRROR_X false
  28. #define DISPLAY_MIRROR_Y true
  29. #define BACKLIGHT_INVERT false
  30. #define DISPLAY_OFFSET_X 20
  31. #define DISPLAY_OFFSET_Y 0
  32. #endif
  33. #ifdef CONFIG_LCD_ILI9341
  34. #define LCD_TYPE_ILI9341_SERIAL
  35. #define DISPLAY_SDA_PIN GPIO_NUM_NC
  36. #define DISPLAY_SCL_PIN GPIO_NUM_NC
  37. #define DISPLAY_WIDTH 320
  38. #define DISPLAY_HEIGHT 240
  39. #define DISPLAY_SWAP_XY false
  40. #define DISPLAY_MIRROR_X true
  41. #define DISPLAY_MIRROR_Y true
  42. #define BACKLIGHT_INVERT false
  43. #define DISPLAY_OFFSET_X 0
  44. #define DISPLAY_OFFSET_Y 0
  45. #endif
  46. #define DISPLAY_BACKLIGHT_PIN GPIO_NUM_NC
  47. #define DISPLAY_BACKLIGHT_OUTPUT_INVERT false
  48. #endif // _BOARD_CONFIG_H_