diff options
author | px4dev <px4@purgatory.org> | 2013-01-11 02:33:02 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-01-11 02:33:02 -0800 |
commit | 41987c7848a7bbf8b0735e3b2905b15e609b8ac0 (patch) | |
tree | a2e022dd5bce21ec9b35ed3eac6babee6a380cf0 | |
parent | fbf4c442307f29bee4c15eb5d656ae167141bee1 (diff) | |
download | px4-firmware-41987c7848a7bbf8b0735e3b2905b15e609b8ac0.tar.gz px4-firmware-41987c7848a7bbf8b0735e3b2905b15e609b8ac0.tar.bz2 px4-firmware-41987c7848a7bbf8b0735e3b2905b15e609b8ac0.zip |
Recover fix for and enabling of interrupt-driven I2C.
-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; } |