diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-01-21 15:09:05 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-01-21 15:09:05 +1100 |
| commit | c7901ae4297d42d55bb3a06010198ecf14b3a7ba (patch) | |
| tree | 3a6f781b22509e72ea1f9906527086f0088c6cdc /src/drivers/include | |
| parent | 8cb9e9361cbb9ab0427a48df923d0017935608be (diff) | |
| download | tangara-fw-c7901ae4297d42d55bb3a06010198ecf14b3a7ba.tar.gz | |
build fixes for new compiler version and standard
Diffstat (limited to 'src/drivers/include')
| -rw-r--r-- | src/drivers/include/battery.hpp | 3 | ||||
| -rw-r--r-- | src/drivers/include/dac.hpp | 1 | ||||
| -rw-r--r-- | src/drivers/include/display.hpp | 3 | ||||
| -rw-r--r-- | src/drivers/include/gpio_expander.hpp | 2 | ||||
| -rw-r--r-- | src/drivers/include/i2c.hpp | 2 |
5 files changed, 7 insertions, 4 deletions
diff --git a/src/drivers/include/battery.hpp b/src/drivers/include/battery.hpp index 9366a5b1..dea46d7c 100644 --- a/src/drivers/include/battery.hpp +++ b/src/drivers/include/battery.hpp @@ -3,6 +3,7 @@ #include <cstdint> #include "esp_adc/adc_oneshot.h" +#include "esp_adc/adc_cali.h" #include "esp_err.h" #include "result.hpp" @@ -18,7 +19,7 @@ class Battery { */ auto Millivolts() -> uint32_t; private: - adc_oneshot_handle_t adc_handle_; + adc_oneshot_unit_handle_t adc_handle_; adc_cali_handle_t adc_calibration_handle_; }; diff --git a/src/drivers/include/dac.hpp b/src/drivers/include/dac.hpp index dc03624b..2d4e812f 100644 --- a/src/drivers/include/dac.hpp +++ b/src/drivers/include/dac.hpp @@ -9,6 +9,7 @@ #include "hal/i2s_types.h" #include "result.hpp" #include "span.hpp" +#include "driver/i2s_types_legacy.h" #include "gpio_expander.hpp" diff --git a/src/drivers/include/display.hpp b/src/drivers/include/display.hpp index 75b2f9a6..5f6d6f58 100644 --- a/src/drivers/include/display.hpp +++ b/src/drivers/include/display.hpp @@ -8,6 +8,7 @@ #include "display_init.hpp" #include "gpio_expander.hpp" +#include "sys/_stdint.h" namespace drivers { @@ -63,7 +64,7 @@ class Display { void SendTransaction(TransactionType type, const uint8_t* data, size_t length, - uintptr_t flags = 0); + uint32_t flags = 0); }; } // namespace drivers diff --git a/src/drivers/include/gpio_expander.hpp b/src/drivers/include/gpio_expander.hpp index 8875e954..a6e96d87 100644 --- a/src/drivers/include/gpio_expander.hpp +++ b/src/drivers/include/gpio_expander.hpp @@ -32,7 +32,7 @@ class GpioExpander { ~GpioExpander(); static const uint8_t kPca8575Address = 0x20; - static const uint8_t kPca8575Timeout = 100 / portTICK_RATE_MS; + static const uint8_t kPca8575Timeout = pdMS_TO_TICKS(100); // Port A: // 0 - audio power enable diff --git a/src/drivers/include/i2c.hpp b/src/drivers/include/i2c.hpp index 3704509d..dbdd8a11 100644 --- a/src/drivers/include/i2c.hpp +++ b/src/drivers/include/i2c.hpp @@ -20,7 +20,7 @@ esp_err_t deinit_i2c(void); */ class I2CTransaction { public: - static const uint8_t kI2CTimeout = 100 / portTICK_RATE_MS; + static const uint8_t kI2CTimeout = pdMS_TO_TICKS(100); I2CTransaction(); ~I2CTransaction(); |
