Migrate to the v5 adc api
This commit is contained in:
+4
-1
@@ -92,7 +92,6 @@ extern "C" void app_main(void) {
|
||||
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LOWMED));
|
||||
ESP_ERROR_CHECK(drivers::init_i2c());
|
||||
ESP_ERROR_CHECK(drivers::init_spi());
|
||||
ESP_ERROR_CHECK(drivers::init_adc());
|
||||
|
||||
ESP_LOGI(TAG, "Init GPIOs");
|
||||
drivers::GpioExpander* expander = new drivers::GpioExpander();
|
||||
@@ -105,6 +104,10 @@ extern "C" void app_main(void) {
|
||||
drivers::GpioExpander::SD_MUX_ESP);
|
||||
});
|
||||
|
||||
ESP_LOGI(TAG, "Init battery measurement");
|
||||
drivers::Battery* battery = new drivers::Battery();
|
||||
ESP_LOGI(TAG, "it's reading %dmV!", battery->Millivolts());
|
||||
|
||||
ESP_LOGI(TAG, "Init SD card");
|
||||
auto storage_res = drivers::SdStorage::create(expander);
|
||||
if (storage_res.has_error()) {
|
||||
|
||||
Reference in New Issue
Block a user