config.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _BOARD_CONFIG_H_
  2. #define _BOARD_CONFIG_H_
  3. #include <driver/gpio.h>
  4. #define AUDIO_INPUT_SAMPLE_RATE 16000
  5. #define AUDIO_OUTPUT_SAMPLE_RATE 24000
  6. #define AUDIO_I2S_MIC_GPIO_SCK GPIO_NUM_38
  7. #define AUDIO_I2S_MIC_GPIO_DIN GPIO_NUM_39
  8. #define AUDIO_I2S_SPK_GPIO_DOUT GPIO_NUM_42
  9. #define AUDIO_I2S_SPK_GPIO_BCLK GPIO_NUM_45
  10. #define AUDIO_I2S_SPK_GPIO_LRCK GPIO_NUM_46
  11. #define AUDIO_I2S_SPK_GPIO_GAIN GPIO_NUM_41
  12. #define BUILTIN_LED_GPIO GPIO_NUM_3
  13. #define BOOT_BUTTON_GPIO GPIO_NUM_0
  14. #define TOUCH_BUTTON_GPIO GPIO_NUM_NC
  15. #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC
  16. #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_NC
  17. #define RESET_NVS_BUTTON_GPIO GPIO_NUM_NC
  18. #define RESET_FACTORY_BUTTON_GPIO GPIO_NUM_NC
  19. /* DFRobot Camera pins */
  20. #define PWDN_GPIO_NUM -1
  21. #define RESET_GPIO_NUM -1
  22. #define XCLK_GPIO_NUM 5
  23. #define Y9_GPIO_NUM 4
  24. #define Y8_GPIO_NUM 6
  25. #define Y7_GPIO_NUM 7
  26. #define Y6_GPIO_NUM 14
  27. #define Y5_GPIO_NUM 17
  28. #define Y4_GPIO_NUM 21
  29. #define Y3_GPIO_NUM 18
  30. #define Y2_GPIO_NUM 16
  31. #define VSYNC_GPIO_NUM 1
  32. #define HREF_GPIO_NUM 2
  33. #define PCLK_GPIO_NUM 15
  34. #define SIOD_GPIO_NUM 8
  35. #define SIOC_GPIO_NUM 9
  36. /* Camera pins */
  37. #define CAMERA_PIN_PWDN PWDN_GPIO_NUM
  38. #define CAMERA_PIN_RESET RESET_GPIO_NUM
  39. #define CAMERA_PIN_XCLK XCLK_GPIO_NUM
  40. #define CAMERA_PIN_SIOD SIOD_GPIO_NUM
  41. #define CAMERA_PIN_SIOC SIOC_GPIO_NUM
  42. #define CAMERA_PIN_D7 Y9_GPIO_NUM
  43. #define CAMERA_PIN_D6 Y8_GPIO_NUM
  44. #define CAMERA_PIN_D5 Y7_GPIO_NUM
  45. #define CAMERA_PIN_D4 Y6_GPIO_NUM
  46. #define CAMERA_PIN_D3 Y5_GPIO_NUM
  47. #define CAMERA_PIN_D2 Y4_GPIO_NUM
  48. #define CAMERA_PIN_D1 Y3_GPIO_NUM
  49. #define CAMERA_PIN_D0 Y2_GPIO_NUM
  50. #define CAMERA_PIN_VSYNC VSYNC_GPIO_NUM
  51. #define CAMERA_PIN_HREF HREF_GPIO_NUM
  52. #define CAMERA_PIN_PCLK PCLK_GPIO_NUM
  53. #define XCLK_FREQ_HZ 20000000
  54. #endif // _BOARD_CONFIG_H_