config.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_I2S_GPIO_MCLK GPIO_NUM_8
  7. #define AUDIO_I2S_GPIO_WS GPIO_NUM_11
  8. #define AUDIO_I2S_GPIO_BCLK GPIO_NUM_9
  9. #define AUDIO_I2S_GPIO_DIN GPIO_NUM_10
  10. #define AUDIO_I2S_GPIO_DOUT GPIO_NUM_12
  11. #define AUDIO_CODEC_PA_PIN GPIO_NUM_4
  12. #define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_5
  13. #define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_6
  14. #define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
  15. //led power
  16. #define BUILTIN_LED_POWER GPIO_NUM_39 // 低电平有效
  17. #define BUILTIN_LED_POWER_OUTPUT_INVERT true
  18. #define BUILTIN_LED_NUM 2
  19. #define BUILTIN_LED_GPIO GPIO_NUM_38
  20. #define MAIN_BUTTON_GPIO GPIO_NUM_21
  21. #define LEFT_BUTTON_GPIO GPIO_NUM_0
  22. #define RIGHT_BUTTON_GPIO GPIO_NUM_47
  23. // display
  24. #define DISPLAY_SDA_PIN GPIO_NUM_16
  25. #define DISPLAY_SCL_PIN GPIO_NUM_15
  26. #define DISPLAY_CS_PIN GPIO_NUM_14
  27. #define DISPLAY_DC_PIN GPIO_NUM_18
  28. #define DISPLAY_RST_PIN GPIO_NUM_17
  29. #define DISPLAY_WIDTH 128
  30. #define DISPLAY_HEIGHT 128
  31. #define DISPLAY_MIRROR_X false
  32. #define DISPLAY_MIRROR_Y false
  33. #define DISPLAY_SWAP_XY false
  34. #define DISPLAY_OFFSET_X 0
  35. #define DISPLAY_OFFSET_Y 0
  36. #define DISPLAY_BACKLIGHT_PIN GPIO_NUM_13
  37. #define DISPLAY_BACKLIGHT_OUTPUT_INVERT true
  38. #define ML307_RX_PIN GPIO_NUM_42
  39. #define ML307_TX_PIN GPIO_NUM_44
  40. #define ML307_POWER_PIN GPIO_NUM_40
  41. #define ML307_POWER_OUTPUT_INVERT false
  42. #endif // _BOARD_CONFIG_H_