Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Diff: drivers/UARTSerial.h
- Revision:
- 1:9db0e321a9f4
- Parent:
- 0:5b88d5760320
--- a/drivers/UARTSerial.h Tue Dec 17 23:23:45 2019 +0000 +++ b/drivers/UARTSerial.h Tue Dec 31 06:02:27 2019 +0000 @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2006-2017 ARM Limited + * Copyright (c) 2006-2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,10 +23,9 @@ #if (DEVICE_SERIAL && DEVICE_INTERRUPTIN) || defined(DOXYGEN_ONLY) #include "platform/FileHandle.h" -#include "SerialBase.h" -#include "InterruptIn.h" +#include "drivers/SerialBase.h" +#include "drivers/InterruptIn.h" #include "platform/PlatformMutex.h" -#include "hal/serial_api.h" #include "platform/CircularBuffer.h" #include "platform/NonCopyable.h" @@ -39,12 +38,14 @@ #endif namespace mbed { - -/** \addtogroup drivers */ +/** + * \defgroup drivers_UARTSerial UARTSerial class + * \ingroup drivers-public-api-uart + * @{ + */ /** Class providing buffered UART communication functionality using separate circular buffer for send and receive channels * - * @ingroup drivers */ class UARTSerial : private SerialBase, public FileHandle, private NonCopyable<UARTSerial> { @@ -57,6 +58,13 @@ * @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE) */ UARTSerial(PinName tx, PinName rx, int baud = MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE); + + /** Create a UARTSerial port, connected to the specified transmit and receive pins, with a particular baud rate. + * @param static_pinmap reference to structure which holds static pinmap + * @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE) + */ + UARTSerial(const serial_pinmap_t &static_pinmap, int baud = MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE); + virtual ~UARTSerial(); /** Equivalent to POSIX poll(). Derived from FileHandle. @@ -255,8 +263,6 @@ private: - void wait_ms(uint32_t millisec); - /** SerialBase lock override */ virtual void lock(void); @@ -314,6 +320,9 @@ void dcd_irq(void); }; + +/** @}*/ + } //namespace mbed #endif //(DEVICE_SERIAL && DEVICE_INTERRUPTIN) || defined(DOXYGEN_ONLY)