diff options
-rwxr-xr-x | nuttx/configs/px4fmu/nsh/defconfig | 2 | ||||
-rw-r--r-- | nuttx/sched/clock_time2ticks.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/configs/px4fmu/nsh/defconfig b/nuttx/configs/px4fmu/nsh/defconfig index 9555e43ec..8a76f0e05 100755 --- a/nuttx/configs/px4fmu/nsh/defconfig +++ b/nuttx/configs/px4fmu/nsh/defconfig @@ -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 diff --git a/nuttx/sched/clock_time2ticks.c b/nuttx/sched/clock_time2ticks.c index 383264d51..9265872bb 100644 --- a/nuttx/sched/clock_time2ticks.c +++ b/nuttx/sched/clock_time2ticks.c @@ -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; } |