mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
189:f392fc9709a3
Parent:
188:bcfe06ba3d64
--- a/drivers/SerialBase.h	Thu Nov 08 11:46:34 2018 +0000
+++ b/drivers/SerialBase.h	Wed Feb 20 22:31:08 2019 +0000
@@ -1,5 +1,6 @@
 /* mbed Microcontroller Library
  * Copyright (c) 2006-2013 ARM Limited
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +19,7 @@
 
 #include "platform/platform.h"
 
-#if defined (DEVICE_SERIAL) || defined(DOXYGEN_ONLY)
+#if DEVICE_SERIAL || defined(DOXYGEN_ONLY)
 
 #include "platform/Callback.h"
 #include "hal/serial_api.h"
@@ -138,9 +139,20 @@
     }
 
     /** Generate a break condition on the serial line
+     *  NOTE: Clear break needs to run at least one frame after set_break is called
+     */
+    void set_break();
+
+    /** Clear a break condition on the serial line
+     *  NOTE: Should be run at least one frame after set_break is called
+     */
+    void clear_break();
+
+    /** Generate a break condition on the serial line
      */
     void send_break();
 
+#if !defined(DOXYGEN_ONLY)
 protected:
 
     /** Acquire exclusive access to this serial port
@@ -150,7 +162,7 @@
     /** Release exclusive access to this serial port
      */
     virtual void unlock(void);
-
+#endif
 public:
 
 #if DEVICE_SERIAL_FC
@@ -235,12 +247,15 @@
      */
     int set_dma_usage_rx(DMAUsage usage);
 
+#if !defined(DOXYGEN_ONLY)
 protected:
     void start_read(void *buffer, int buffer_size, char buffer_width, const event_callback_t &callback, int event, unsigned char char_match);
     void start_write(const void *buffer, int buffer_size, char buffer_width, const event_callback_t &callback, int event);
     void interrupt_handler_asynch(void);
 #endif
+#endif
 
+#if !defined(DOXYGEN_ONLY)
 protected:
     SerialBase(PinName tx, PinName rx, int baud);
     virtual ~SerialBase();
@@ -259,7 +274,7 @@
     serial_t         _serial;
     Callback<void()> _irq[IrqCnt];
     int              _baud;
-
+#endif
 };
 
 } // namespace mbed