Skip to content

Commit 548f0f1

Browse files
committed
fix
1 parent 7c00b7a commit 548f0f1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bsp/gd32/arm/libraries/gd32_drivers/drv_hw_i2c.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,7 @@ static rt_ssize_t gd32_i2c_master_xfer(struct rt_i2c_bus_device *bus, struct rt_
533533
{
534534
if (!(msgs[num - 1].flags & RT_I2C_NO_STOP))
535535
{
536-
LOG_D("[%s] Last message, generating STOP.", cfg->device_name);
537-
I2C_CTL0(cfg->i2c_periph) |= I2C_CTL0_STOP;
536+
LOG_D("[%s] Last message, Waiting STOP.", cfg->device_name);
538537
rt_uint32_t timeout = 1000;
539538
while(I2C_STAT1(cfg->i2c_periph) & I2C_STAT1_I2CBSY && timeout--)
540539
{

0 commit comments

Comments
 (0)