Skip to content

Commit

Permalink
Fix error in I2C write operation on AT32 (betaflight#13228)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveCEvans authored Dec 16, 2023
1 parent bc69a92 commit 43c645a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/

#include "i2c_application.h"
#include "drivers/pinio.h"

/** @addtogroup AT32F435_437_middlewares_i2c_application_library
* @{
Expand Down Expand Up @@ -1071,7 +1070,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, i2c_mem_address_width_ty
hi2c->mode = I2C_MA_TX;

// Initialise the data buffer
i2c_set_buffer(hi2c, I2C_STEP_DATA, pdata, size);
i2c_set_buffer(hi2c, I2C_STEP_DATA, pdata, size + mem_address_width);

hi2c->error_code = I2C_OK;

Expand Down

0 comments on commit 43c645a

Please sign in to comment.