From 5da5ef45c0c69a9bb0c499a31399f1ad5888982e Mon Sep 17 00:00:00 2001 From: Donatien Garnier Date: Thu, 31 May 2018 11:11:28 -0500 Subject: [PATCH] Cordio H4: Added some comments explaining the use of RawSerial as opposed to using Serial --- .../targets/TARGET_CORDIO/driver/H4TransportDriver.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/H4TransportDriver.h b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/H4TransportDriver.h index ff1e743fca..299083e31d 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/H4TransportDriver.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/H4TransportDriver.h @@ -69,6 +69,10 @@ public: private: void on_controller_irq(); + // Use RawSerial as opposed to Serial as we don't require the locking primitives + // provided by the Serial class (access to the UART should be exclusive to this driver) + // Furthermore, we access the peripheral in interrupt context which would clash + // with Serial's locking facilities RawSerial uart; PinName cts; PinName rts;