From 50b10246275360bfa9e6582a4ac690a665957056 Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:18:10 +0200 Subject: [PATCH] fix: add missing `const` to `_write_reg` --- components/dps310/priv_include/helper_i2c.h | 2 +- components/dps310/src/helper_i2c.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/dps310/priv_include/helper_i2c.h b/components/dps310/priv_include/helper_i2c.h index 43ed3ba1..34b770c3 100644 --- a/components/dps310/priv_include/helper_i2c.h +++ b/components/dps310/priv_include/helper_i2c.h @@ -58,7 +58,7 @@ esp_err_t _read_reg_mask(i2c_dev_t *dev, uint8_t reg, uint8_t mask, uint8_t *val /** * @brief Write a single byte to a 8-bit resister with locking. */ -esp_err_t _write_reg(i2c_dev_t *dev, uint8_t reg, uint8_t *value); +esp_err_t _write_reg(i2c_dev_t *dev, uint8_t reg, const uint8_t *value); /** * @brief Update a 8-bit resister with a masked value without locking. diff --git a/components/dps310/src/helper_i2c.c b/components/dps310/src/helper_i2c.c index 21768a64..a33974a3 100644 --- a/components/dps310/src/helper_i2c.c +++ b/components/dps310/src/helper_i2c.c @@ -120,7 +120,7 @@ esp_err_t _update_reg_nolock(i2c_dev_t *dev, uint8_t reg, uint8_t mask, uint8_t return ESP_OK; } -esp_err_t _write_reg(i2c_dev_t *dev, uint8_t reg, uint8_t *value) +esp_err_t _write_reg(i2c_dev_t *dev, uint8_t reg, const uint8_t *value) { esp_err_t err = ESP_FAIL;