config.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _BOARD_CONFIG_H_
  2. #define _BOARD_CONFIG_H_
  3. // M5Stack CoreS3 Board configuration
  4. #include <driver/gpio.h>
  5. #define AUDIO_INPUT_REFERENCE true
  6. #define AUDIO_INPUT_SAMPLE_RATE 24000
  7. #define AUDIO_OUTPUT_SAMPLE_RATE 24000
  8. #define AUDIO_I2S_GPIO_MCLK GPIO_NUM_0
  9. #define AUDIO_I2S_GPIO_WS GPIO_NUM_33
  10. #define AUDIO_I2S_GPIO_BCLK GPIO_NUM_34
  11. #define AUDIO_I2S_GPIO_DIN GPIO_NUM_14
  12. #define AUDIO_I2S_GPIO_DOUT GPIO_NUM_13
  13. #define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_12
  14. #define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_11
  15. #define AUDIO_CODEC_AW88298_ADDR AW88298_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_0
  19. #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC
  20. #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_NC
  21. #define DISPLAY_SDA_PIN GPIO_NUM_NC
  22. #define DISPLAY_SCL_PIN GPIO_NUM_NC
  23. #define DISPLAY_WIDTH 320
  24. #define DISPLAY_HEIGHT 240
  25. #define DISPLAY_MIRROR_X false
  26. #define DISPLAY_MIRROR_Y false
  27. #define DISPLAY_SWAP_XY false
  28. #define DISPLAY_OFFSET_X 0
  29. #define DISPLAY_OFFSET_Y 0
  30. #define DISPLAY_BACKLIGHT_PIN GPIO_NUM_NC
  31. #define DISPLAY_BACKLIGHT_OUTPUT_INVERT true
  32. /* Camera pins */
  33. #define CAMERA_PIN_PWDN GPIO_NUM_NC
  34. #define CAMERA_PIN_RESET GPIO_NUM_NC
  35. #define CAMERA_PIN_XCLK GPIO_NUM_NC // 像素时钟 (固定由 20MHz 外部晶振输入)
  36. #define CAMERA_PIN_SIOD GPIO_NUM_NC // 串行时钟 Using existing I2C port
  37. #define CAMERA_PIN_SIOC GPIO_NUM_NC // 串行时钟 Using existing I2C port
  38. #define CAMERA_PIN_D0 GPIO_NUM_39
  39. #define CAMERA_PIN_D1 GPIO_NUM_40
  40. #define CAMERA_PIN_D2 GPIO_NUM_41
  41. #define CAMERA_PIN_D3 GPIO_NUM_42
  42. #define CAMERA_PIN_D4 GPIO_NUM_15
  43. #define CAMERA_PIN_D5 GPIO_NUM_16
  44. #define CAMERA_PIN_D6 GPIO_NUM_48
  45. #define CAMERA_PIN_D7 GPIO_NUM_47
  46. #define CAMERA_PIN_VSYNC GPIO_NUM_46
  47. #define CAMERA_PIN_HREF GPIO_NUM_38
  48. #define CAMERA_PIN_PCLK GPIO_NUM_45
  49. #define XCLK_FREQ_HZ 20000000
  50. #endif // _BOARD_CONFIG_H_