summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dependencies.lock6
-rw-r--r--src/drivers/i2c.cpp5
-rw-r--r--src/drivers/include/i2c.hpp2
3 files changed, 4 insertions, 9 deletions
diff --git a/dependencies.lock b/dependencies.lock
index e1559487..7ad9b378 100644
--- a/dependencies.lock
+++ b/dependencies.lock
@@ -1,13 +1,9 @@
-# Copyright 2023 jacqueline <me@jacqueline.id.au>
-#
-# SPDX-License-Identifier: CC0-1.0
-
dependencies:
idf:
component_hash: null
source:
type: idf
- version: 5.0.0
+ version: 5.1.0
manifest_hash: 7e6103d8e34e5eabd5a6a51c49836c58f1686c3aa287f2e288b1ad76243aa61a
target: esp32
version: 1.0.0
diff --git a/src/drivers/i2c.cpp b/src/drivers/i2c.cpp
index 814c5140..75beacda 100644
--- a/src/drivers/i2c.cpp
+++ b/src/drivers/i2c.cpp
@@ -11,6 +11,7 @@
#include "assert.h"
#include "driver/i2c.h"
#include "esp_err.h"
+#include "hal/i2c_types.h"
namespace drivers {
@@ -46,8 +47,6 @@ esp_err_t init_i2c(void) {
return err;
}
- // TODO: INT line
-
return ESP_OK;
}
@@ -66,7 +65,7 @@ I2CTransaction::~I2CTransaction() {
free(buffer_);
}
-esp_err_t I2CTransaction::Execute(uint8_t port) {
+esp_err_t I2CTransaction::Execute(i2c_port_t port) {
return i2c_master_cmd_begin(port, handle_, kI2CTimeout);
}
diff --git a/src/drivers/include/i2c.hpp b/src/drivers/include/i2c.hpp
index bc6b3686..213fb7b3 100644
--- a/src/drivers/include/i2c.hpp
+++ b/src/drivers/include/i2c.hpp
@@ -41,7 +41,7 @@ class I2CTransaction {
* ESP_ERR_INVALID_STATE I2C driver not installed or not in master mode.
* ESP_ERR_TIMEOUT Operation timeout because the bus is busy.
*/
- esp_err_t Execute(uint8_t port = I2C_NUM_0);
+ esp_err_t Execute(i2c_port_t port = I2C_NUM_0);
/*
* Enqueues a start condition. May also be used for repeated start