Complete upstream transport integration and regression coverage

This commit is contained in:
mikecarper committed 2026-09-15 21:08:10 -07:00
1 parent 4d34448602
commit 439dc7da3c
10 files changed
+124 -3

No files matched your search

+11
View File
@@ -172,9 +172,20 @@ bool SerialBLEInterface::isConnected() const {
}
bool SerialBLEInterface::isWriteBusy() const {
BluetoothLock lock;
return send_queue_len >= (FRAME_QUEUE_SIZE * 2 / 3);
}
bool SerialBLEInterface::isReadBusy() const {
BluetoothLock lock;
return recv_queue_len > 0;
}
bool SerialBLEInterface::hasPendingIO() const {
BluetoothLock lock;
return recv_queue_len > 0 || send_queue_len > 0 || _tx_pending;
}
size_t SerialBLEInterface::writeFrame(const uint8_t src[], size_t len) {
if (len == 0 || len > MAX_FRAME_SIZE) {
BLE_DEBUG_PRINTLN("writeFrame(), frame too big, len=%u", (unsigned)len);
+3 -1
View File
@@ -51,7 +51,7 @@ public:
/**
* init the BLE interface.
* @param prefix a prefix for the device name
* @param name IN/OUT - a name for the device (combined with prefix). If "@@MAC", is modified and returned
* @param name a name for the device (combined with prefix), or "@@MAC"
* @param pin_code the BLE security pin
*/
bool begin(const char* prefix, const char* name, uint32_t pin_code,
@@ -70,7 +70,9 @@ public:
void disable() override;
bool isEnabled() const override { return _isEnabled; }
bool isConnected() const override;
bool isReadBusy() const override;
bool isWriteBusy() const override;
bool hasPendingIO() const override;
size_t writeFrame(const uint8_t src[], size_t len) override;
size_t checkRecvFrame(uint8_t dest[]) override;
};