config.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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 16000
  6. #define AUDIO_INPUT_REFERENCE false
  7. #define AUDIO_I2S_GPIO_MCLK GPIO_NUM_8
  8. #define AUDIO_I2S_GPIO_WS GPIO_NUM_17
  9. #define AUDIO_I2S_GPIO_BCLK GPIO_NUM_16
  10. #define AUDIO_I2S_GPIO_DIN GPIO_NUM_15
  11. #define AUDIO_I2S_GPIO_DOUT GPIO_NUM_18
  12. #define AUDIO_CODEC_PA_PIN GPIO_NUM_40
  13. #define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_2
  14. #define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_1
  15. #define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
  16. #define BOOT_BUTTON_GPIO GPIO_NUM_0
  17. #define KEY_BUTTON_GPIO GPIO_NUM_12
  18. #define LED_PIN GPIO_NUM_11
  19. #define VBAT_ADC_CHANNEL ADC_CHANNEL_9 // S3: IO10
  20. #define MCU_VCC_CTL GPIO_NUM_4 // set 1 to power on MCU
  21. #define PERP_VCC_CTL GPIO_NUM_6 // set 1 to power on peripherals
  22. #define ADC_ATTEN ADC_ATTEN_DB_12
  23. #define ADC_WIDTH ADC_BITWIDTH_DEFAULT
  24. #define FULL_BATTERY_VOLTAGE 4100
  25. #define EMPTY_BATTERY_VOLTAGE 3200
  26. #endif // _BOARD_CONFIG_H_