mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 09:13:32 +08:00
Recover fix for and enabling of interrupt-driven I2C.
This commit is contained in:
@@ -352,7 +352,7 @@ CONFIG_CAN2_BAUD=700000
|
||||
# I2C configuration
|
||||
#
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_POLLED=y
|
||||
#CONFIG_I2C_POLLED=y
|
||||
CONFIG_I2C_TRANSFER=y
|
||||
CONFIG_I2C_TRACE=n
|
||||
CONFIG_I2C_RESET=y
|
||||
|
||||
@@ -97,6 +97,6 @@ int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks)
|
||||
|
||||
/* Convert microseconds to clock ticks */
|
||||
|
||||
*ticks = relusec / USEC_PER_TICK;
|
||||
*ticks = (relusec + USEC_PER_TICK - 1) / USEC_PER_TICK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user