Skip to content

Commit 0aeb150

Browse files
author
Cruz Monrreal
authored
Merge pull request #7075 from donatieng/fix_cordio_h4_serial
BLE: Replace Serial with RawSerial in Cordio H4 Transport Driver
2 parents 07fb7c1 + 5da5ef4 commit 0aeb150

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/H4TransportDriver.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ class H4TransportDriver : public CordioHCITransportDriver {
6969
private:
7070
void on_controller_irq();
7171

72-
Serial uart;
72+
// Use RawSerial as opposed to Serial as we don't require the locking primitives
73+
// provided by the Serial class (access to the UART should be exclusive to this driver)
74+
// Furthermore, we access the peripheral in interrupt context which would clash
75+
// with Serial's locking facilities
76+
RawSerial uart;
7377
PinName cts;
7478
PinName rts;
7579
};

0 commit comments

Comments
 (0)