Allow ESP32 with BLE to compile

This commit is contained in:
jacob.eva 2024-09-11 21:49:56 +01:00
parent ba9022335c
commit 07b7e28c74
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E

View File

@ -579,6 +579,7 @@ void serial_write(uint8_t byte) {
} else { } else {
SerialBT.write(byte); SerialBT.write(byte);
#if MCU_VARIANT == MCU_NRF52 && HAS_BLE
// This ensures that the TX buffer is flushed after a frame is queued in serial. // This ensures that the TX buffer is flushed after a frame is queued in serial.
// serial_in_frame is used to ensure that the flush only happens at the end of the frame // serial_in_frame is used to ensure that the flush only happens at the end of the frame
if (serial_in_frame && byte == FEND) { if (serial_in_frame && byte == FEND) {
@ -588,6 +589,7 @@ void serial_write(uint8_t byte) {
else if (!serial_in_frame && byte == FEND) { else if (!serial_in_frame && byte == FEND) {
serial_in_frame = true; serial_in_frame = true;
} }
#endif
} }
#else #else
Serial.write(byte); Serial.write(byte);