mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 06:01:36 +08:00
drivers/optical_flow/paa3905: fix RegisterRead udelay
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* Copyright (c) 2022-2023 PX4 Development Team. All rights reserved.
|
* Copyright (c) 2022-2024 PX4 Development Team. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -714,7 +714,7 @@ uint8_t PAA3905::RegisterRead(uint8_t reg)
|
|||||||
// tSRW/tSRR SPI Time Between Read And Subsequent Commands
|
// tSRW/tSRR SPI Time Between Read And Subsequent Commands
|
||||||
const hrt_abstime elapsed_last_read = hrt_elapsed_time(&_last_read_time);
|
const hrt_abstime elapsed_last_read = hrt_elapsed_time(&_last_read_time);
|
||||||
|
|
||||||
if (elapsed_last_write < TIME_TSRW_TSRR_us) {
|
if (elapsed_last_read < TIME_TSRW_TSRR_us) {
|
||||||
px4_udelay(TIME_TSRW_TSRR_us - elapsed_last_read);
|
px4_udelay(TIME_TSRW_TSRR_us - elapsed_last_read);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user