Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing const to _write_reg #656

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/dps310/priv_include/helper_i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion components/dps310/src/helper_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading