-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate
- Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
- Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
esp_err_t esp_sccb_transmit_reg_a8v16(esp_sccb_io_handle_t io_handle, uint8_t reg_addr, uint16_t reg_val)
{
esp_err_t ret = ESP_OK;
ESP_RETURN_ON_FALSE(io_handle, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE(io_handle->transmit_reg_a8v16, ESP_ERR_NOT_SUPPORTED, TAG, "controller driver function not supported");
uint8_t data[3] = {0};
data[0] = reg_addr & 0xff;
data[1] = (reg_val & 0xff00) >> 8;
data[2] = reg_val & 0xff;
ESP_RETURN_ON_ERROR(io_handle->transmit_reg_a8v16(io_handle, data, 3, ESP_SCCB_TRANS_DEALY), TAG, "failed to transmit_reg_a8v16");
return ret;
}
Actual behavior (suspected bug)
esp_err_t esp_sccb_transmit_reg_a8v16(esp_sccb_io_handle_t io_handle, uint8_t reg_addr, uint16_t reg_val)
{
esp_err_t ret = ESP_FAIL;
ESP_RETURN_ON_FALSE(io_handle, ESP_ERR_INVALID_ARG, TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE(io_handle->transmit_reg_a8v16, ESP_ERR_NOT_SUPPORTED, TAG, "controller driver function not supported");
uint8_t data[3] = {0};
data[0] = reg_addr & 0xff;
data[1] = (reg_val & 0xff00) >> 8;
data[2] = reg_val & 0xff;
ESP_RETURN_ON_ERROR(io_handle->transmit_reg_a8v16(io_handle, data, 3, -1), TAG, "failed to transmit_reg_a8v16");
reg_val = __builtin_bswap16(reg_val);
return ret;
}
Error logs or terminal output
Steps to reproduce the behavior
See Error
Project release version
latest
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Windows 10
Shell
ZSH
Additional context
No response