config.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_3
  8. #define AUDIO_I2S_GPIO_WS GPIO_NUM_38
  9. #define AUDIO_I2S_GPIO_BCLK GPIO_NUM_0
  10. #define AUDIO_I2S_GPIO_DIN GPIO_NUM_39
  11. #define AUDIO_I2S_GPIO_DOUT GPIO_NUM_45
  12. #define AUDIO_CODEC_PA_PIN GPIO_NUM_NC
  13. #define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_47
  14. #define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_48
  15. #define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
  16. #define AUDIO_CODEC_ES7210_ADDR 0x23
  17. #define BUILTIN_LED_GPIO GPIO_NUM_46
  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. /* Expander */
  22. #define DRV_IO_EXP_INPUT_MASK (IO_EXPANDER_PIN_NUM_2 | IO_EXPANDER_PIN_NUM_12)
  23. #define DISPLAY_WIDTH 240
  24. #define DISPLAY_HEIGHT 320
  25. #define DISPLAY_MIRROR_X false
  26. #define DISPLAY_MIRROR_Y true
  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 false
  32. /* DFRobot K10 Camera pins */
  33. #define PWDN_GPIO_NUM -1
  34. #define RESET_GPIO_NUM -1
  35. #define XCLK_GPIO_NUM 7
  36. #define VSYNC_GPIO_NUM 4
  37. #define HREF_GPIO_NUM 5
  38. #define PCLK_GPIO_NUM 17
  39. #define SIOD_GPIO_NUM 20
  40. #define SIOC_GPIO_NUM 19
  41. /* Camera pins */
  42. #define CAMERA_PIN_PWDN PWDN_GPIO_NUM
  43. #define CAMERA_PIN_RESET RESET_GPIO_NUM
  44. #define CAMERA_PIN_XCLK XCLK_GPIO_NUM
  45. #define CAMERA_PIN_SIOD SIOD_GPIO_NUM
  46. #define CAMERA_PIN_SIOC SIOC_GPIO_NUM
  47. #define CAMERA_PIN_D9 6
  48. #define CAMERA_PIN_D8 15
  49. #define CAMERA_PIN_D7 16
  50. #define CAMERA_PIN_D6 18
  51. #define CAMERA_PIN_D5 9
  52. #define CAMERA_PIN_D4 11
  53. #define CAMERA_PIN_D3 10
  54. #define CAMERA_PIN_D2 8
  55. #define CAMERA_PIN_VSYNC VSYNC_GPIO_NUM
  56. #define CAMERA_PIN_HREF HREF_GPIO_NUM
  57. #define CAMERA_PIN_PCLK PCLK_GPIO_NUM
  58. #define XCLK_FREQ_HZ 20000000
  59. #endif // _BOARD_CONFIG_H_