Skip to content

Commit

Permalink
board/stm32f4discovery: Fix ds1307.c initialization
Browse files Browse the repository at this point in the history
The ds1307 doesn't need to call i2c_register() because it is done
inside stm32_bringup.c

Signed-off-by: Alan C. Assis <[email protected]>
  • Loading branch information
acassis committed Apr 16, 2024
1 parent 58f0ee6 commit e5c177a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions boards/arm/stm32/stm32f4discovery/src/stm32_ds1307.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,6 @@ int stm32_ds1307_init(void)
return -ENODEV;
}

#ifdef CONFIG_I2C_DRIVER
/* Register the I2C to get the "nsh> i2c bus" command working */

ret = i2c_register(i2c, DS1307_I2C_BUS);
if (ret < 0)
{
rtcerr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret);
return -ENODEV;
}
#endif

/* Synchronize the system time to the RTC time */

clock_synchronize(NULL);
Expand Down

0 comments on commit e5c177a

Please sign in to comment.