AP_HAL: added is_write_locked() for UARTs

This commit is contained in:
Andrew Tridgell 2024-01-18 10:34:59 +11:00
parent 7e79a13053
commit f77f8e5ad7

View File

@ -178,6 +178,13 @@ public:
}
#endif
/*
return true if the port is currently locked for writing
*/
bool is_write_locked(void) const {
return lock_write_key != 0;
}
protected:
// key for a locked port
uint32_t lock_write_key;