forked from Archive/PX4-Autopilot
Recover fix for and enabling of interrupt-driven I2C.
This commit is contained in:
parent
fbf4c44230
commit
41987c7848
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue