forked from xiaozhi/xiaozhi-esp32
add new boards
This commit is contained in:
@@ -72,10 +72,11 @@ public:
|
||||
return new BoxAudioDevice();
|
||||
}
|
||||
|
||||
virtual bool GetBatteryVoltage(int &voltage) override {
|
||||
virtual bool GetBatteryVoltage(int &voltage, bool& charging) override {
|
||||
int adc_reading;
|
||||
ESP_ERROR_CHECK(adc_oneshot_read(adc1_handle_, ADC_CHANNEL_0, &adc_reading));
|
||||
ESP_ERROR_CHECK(adc_cali_raw_to_voltage(adc1_cali_handle_, adc_reading, &voltage));
|
||||
charging = false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,16 +17,20 @@
|
||||
#define AUDIO_CODEC_PA_PIN GPIO_NUM_40
|
||||
#define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_39
|
||||
#define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_38
|
||||
#define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
|
||||
#define AUDIO_CODEC_ES7210_ADDR ES7210_CODEC_DEFAULT_ADDR
|
||||
|
||||
#define BUILTIN_LED_GPIO GPIO_NUM_8
|
||||
#define BOOT_BUTTON_GPIO GPIO_NUM_0
|
||||
#define VOLUME_UP_BUTTON_GPIO GPIO_NUM_6
|
||||
#define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_7
|
||||
|
||||
#define DISPLAY_WIDTH 128
|
||||
#define DISPLAY_HEIGHT 64
|
||||
#define DISPLAY_SDA_PIN GPIO_NUM_4
|
||||
#define DISPLAY_SCL_PIN GPIO_NUM_5
|
||||
#define DISPLAY_WIDTH 128
|
||||
#define DISPLAY_HEIGHT 64
|
||||
#define DISPLAY_MIRROR_X true
|
||||
#define DISPLAY_MIRROR_Y true
|
||||
|
||||
#define ML307_RX_PIN GPIO_NUM_17
|
||||
#define ML307_TX_PIN GPIO_NUM_16
|
||||
|
||||
Reference in New Issue
Block a user