| 296 | } |
| 297 | |
| 298 | bool UartPeripheralEsp::isBusy() const FL_NOEXCEPT { |
| 299 | if (!mInitialized) { |
| 300 | return false; |
| 301 | } |
| 302 | |
| 303 | // Check reset period FIRST (channel draining) |
| 304 | const u64 now = fl::micros(); |
| 305 | if (now < mResetExpireTime) { |
| 306 | return true; // Still in reset period |
| 307 | } |
| 308 | |
| 309 | // Then check if transmission is still in progress |
| 310 | // Non-blocking poll: waitTxDone with 0 timeout |
| 311 | // Cast away const since we're calling a non-const method |
| 312 | return !const_cast<UartPeripheralEsp*>(this)->waitTxDone(0); |
| 313 | } |
| 314 | |
| 315 | //============================================================================= |
| 316 | // State Queries |
no test coverage detected