patch delayMicroseconds()
This commit is contained in:
1 parent
072985f65c
commit
a7711e09af
2 files changed
+9
-1
No files matched your search
@@ -420,5 +420,9 @@ int8_t CultivarEnv::_i2cWrite(uint8_t reg_addr, const uint8_t *data,
|
||||
|
||||
void CultivarEnv::_delayUs(uint32_t period, void *intf_ptr) {
|
||||
(void)intf_ptr;
|
||||
delayMicroseconds(period);
|
||||
// delayMicroseconds() unreliable on Zephyr for long delays — convert to ms
|
||||
uint32_t ms = period / 1000;
|
||||
uint32_t us = period % 1000;
|
||||
if (ms > 0) delay(ms);
|
||||
if (us > 0) delayMicroseconds(us);
|
||||
}
|
||||
Reference in new issue
Block a user