From 84dad6ce539925a683f5ba121f87686d61b2e507 Mon Sep 17 00:00:00 2001 From: Jenny Plunkett Date: Fri, 12 Oct 2018 13:18:11 -0500 Subject: [PATCH 01/12] Remove RawSerial protected member functions --- drivers/RawSerial.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/RawSerial.h b/drivers/RawSerial.h index 1ede0c8a33..4325bcb9e0 100644 --- a/drivers/RawSerial.h +++ b/drivers/RawSerial.h @@ -88,6 +88,7 @@ public: int printf(const char *format, ...); +#if !(DOXYGEN_ONLY) protected: /* Acquire exclusive access to this serial port @@ -97,6 +98,7 @@ protected: /* Release exclusive access to this serial port */ virtual void unlock(void); +#endif }; } // namespace mbed From 20f913a06e48a0c260175a279b94e19cc676bb99 Mon Sep 17 00:00:00 2001 From: Jenny Plunkett Date: Fri, 12 Oct 2018 13:20:02 -0500 Subject: [PATCH 02/12] Remove Serial protected member functions and attributes --- drivers/Serial.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/Serial.h b/drivers/Serial.h index 7c5e536acb..4493c6f6f9 100644 --- a/drivers/Serial.h +++ b/drivers/Serial.h @@ -99,6 +99,7 @@ public: return SerialBase::writeable(); } +#if !(DOXYGEN_ONLY) protected: virtual int _getc(); virtual int _putc(int c); @@ -106,6 +107,7 @@ protected: virtual void unlock(); PlatformMutex _mutex; +#endif }; } // namespace mbed From a6a2852f13b590de9f741e72a1558ac8933d0c7e Mon Sep 17 00:00:00 2001 From: RFulchiero Date: Fri, 12 Oct 2018 13:21:18 -0500 Subject: [PATCH 03/12] Documentation improvements only - Prevent protected attributes from appearing on docs site. - Standardize units of time (microsecond, millisecond). - Improve example description. --- drivers/PwmOut.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/PwmOut.h b/drivers/PwmOut.h index 04e0a22618..ffa17f4212 100644 --- a/drivers/PwmOut.h +++ b/drivers/PwmOut.h @@ -32,7 +32,7 @@ namespace mbed { * * Example * @code - * // Fade a led on. + * // Gradually change the intensity of the LED. * #include "mbed.h" * * PwmOut led(LED1); @@ -118,8 +118,8 @@ public: core_util_critical_section_exit(); } - /** Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same. - * @param ms Change the period of a PWM signal in milli-seconds without modifying the duty cycle + /** Set the PWM period, specified in milliseconds (int), keeping the duty cycle the same. + * @param ms Change the period of a PWM signal in milliseconds without modifying the duty cycle */ void period_ms(int ms) { @@ -128,8 +128,8 @@ public: core_util_critical_section_exit(); } - /** Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same. - * @param us Change the period of a PWM signal in micro-seconds without modifying the duty cycle + /** Set the PWM period, specified in microseconds (int), keeping the duty cycle the same. + * @param us Change the period of a PWM signal in microseconds without modifying the duty cycle */ void period_us(int us) { @@ -148,8 +148,8 @@ public: core_util_critical_section_exit(); } - /** Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same. - * @param ms Change the pulse width of a PWM signal specified in milli-seconds + /** Set the PWM pulsewidth, specified in milliseconds (int), keeping the period the same. + * @param ms Change the pulse width of a PWM signal specified in milliseconds */ void pulsewidth_ms(int ms) { @@ -158,8 +158,8 @@ public: core_util_critical_section_exit(); } - /** Set the PWM pulsewidth, specified in micro-seconds (int), keeping the period the same. - * @param us Change the pulse width of a PWM signal specified in micro-seconds + /** Set the PWM pulsewidth, specified in microseconds (int), keeping the period the same. + * @param us Change the pulse width of a PWM signal specified in microseconds */ void pulsewidth_us(int us) { @@ -197,6 +197,7 @@ public: return read(); } +#if !(DOXYGEN_ONLY) protected: /** Lock deep sleep only if it is not yet locked */ void lock_deep_sleep() @@ -219,6 +220,7 @@ protected: pwmout_t _pwm; bool _deep_sleep_locked; }; +#endif } // namespace mbed From 9a7f359ab54cfaca24385bde3722215afe8b0c85 Mon Sep 17 00:00:00 2001 From: Jenny Plunkett Date: Fri, 12 Oct 2018 13:22:14 -0500 Subject: [PATCH 04/12] Add (Not Connected) --- drivers/Serial.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/Serial.h b/drivers/Serial.h index 4493c6f6f9..0e88d00fee 100644 --- a/drivers/Serial.h +++ b/drivers/Serial.h @@ -66,7 +66,7 @@ public: * @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE) * * @note - * Either tx or rx may be specified as NC if unused + * Either tx or rx may be specified as NC (Not Connected) if unused */ Serial(PinName tx, PinName rx, const char *name = NULL, int baud = MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE); @@ -78,7 +78,7 @@ public: * @param baud The baud rate of the serial port * * @note - * Either tx or rx may be specified as NC if unused + * Either tx or rx may be specified as NC (Not Connected) if unused */ Serial(PinName tx, PinName rx, int baud); From 5ee5b071ab5b45bbcf0ab8b8f9ca0cba9f06fc72 Mon Sep 17 00:00:00 2001 From: Jenny Plunkett Date: Fri, 12 Oct 2018 13:22:49 -0500 Subject: [PATCH 05/12] Remove note about Stream/Serial deprecation --- drivers/Serial.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/Serial.h b/drivers/Serial.h index 0e88d00fee..12882808b6 100644 --- a/drivers/Serial.h +++ b/drivers/Serial.h @@ -82,10 +82,6 @@ public: */ Serial(PinName tx, PinName rx, int baud); - /* Stream gives us a FileHandle with non-functional poll()/readable()/writable. Pass through - * the calls from the SerialBase instead for backwards compatibility. This problem is - * part of why Stream and Serial should be deprecated. - */ bool readable() { return SerialBase::readable(); From b31bc766e661f64b8bbeb096c892bddc023fe8cf Mon Sep 17 00:00:00 2001 From: Jenny Plunkett Date: Fri, 12 Oct 2018 13:40:23 -0500 Subject: [PATCH 06/12] Add note about default baud rate is 9600 --- drivers/Serial.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/Serial.h b/drivers/Serial.h index 12882808b6..434d6aa177 100644 --- a/drivers/Serial.h +++ b/drivers/Serial.h @@ -63,7 +63,7 @@ public: * @param tx Transmit pin * @param rx Receive pin * @param name The name of the stream associated with this serial port (optional) - * @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE) + * @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE or 9600) * * @note * Either tx or rx may be specified as NC (Not Connected) if unused From 76b15726a4758a62f1810ddd819f4d14bbe9cae9 Mon Sep 17 00:00:00 2001 From: Lari-Matias Orjala Date: Thu, 4 Oct 2018 16:11:38 +0300 Subject: [PATCH 07/12] update unit testing documentation for Mac OS Mojave --- UNITTESTS/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/UNITTESTS/README.md b/UNITTESTS/README.md index 0b23dbfcbe..9757cef939 100644 --- a/UNITTESTS/README.md +++ b/UNITTESTS/README.md @@ -11,7 +11,7 @@ Unit tests test code in small sections on a host machine. Unlike other testing t Please install the following dependencies to use Mbed OS unit testing. - GNU toolchains. - - GCC 6 or later. We recommend you use MinGW-W64 on Windows, but any Windows port of the above GCC versions works. + - GCC 6 or later. We recommend you use MinGW-W64 on Windows, but any Windows port of the above GCC versions works. Default compilers can be used on Mac OS instead of GCC to shorten build times, but code coverage results can then differ. - CMake 3.0 or newer. - Python 2.7.x, 3.5 or newer. - Pip 10.0 or newer. @@ -35,7 +35,8 @@ Detailed instructions for supported operating systems are below. #### Installing dependencies on macOS 1. Install [Homebrew](https://brew.sh/). -1. Install GCC compilers and CMake with: `brew install gcc cmake`. +1. Install Xcode Command Line Tools with `xcode-select --install`. +1. Install CMake with: `brew install cmake`. 1. Install Python and Pip: ``` @@ -44,6 +45,7 @@ Detailed instructions for supported operating systems are below. ``` 1. Install Gcovr and [Mbed CLI](https://os.mbed.com/docs/latest/tools/developing-arm-mbed-cli.html) with `pip install "gcovr>=4.1" mbed-cli`. +1. (Optional) Install GCC with `brew install gcc`. #### Installing dependencies on Windows @@ -200,3 +202,6 @@ Use Mbed CLI to generate code coverage reports. For advanced use, follow these s **Problem:** Virus protection identifies files generated by CMake as malicious and quarantines the files on Windows. * **Solution**: Restore the false positive files from the quarantine. + +**Problem:** CMake compiler check fails on Mac OS Mojave when using GCC-8. +* **Solution**: Make sure gnm (binutils) is not installed. Uninstall binutils with `brew uninstall binutils`. From 383798b525bdc599c0194bd0f4268ea230d1e088 Mon Sep 17 00:00:00 2001 From: Jenny Plunkett Date: Mon, 15 Oct 2018 14:42:45 -0500 Subject: [PATCH 08/12] Revert "Remove note about Stream/Serial deprecation" This reverts commit 5ee5b071ab5b45bbcf0ab8b8f9ca0cba9f06fc72. --- drivers/Serial.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/Serial.h b/drivers/Serial.h index 434d6aa177..1b1e6aa34e 100644 --- a/drivers/Serial.h +++ b/drivers/Serial.h @@ -82,6 +82,10 @@ public: */ Serial(PinName tx, PinName rx, int baud); + /* Stream gives us a FileHandle with non-functional poll()/readable()/writable. Pass through + * the calls from the SerialBase instead for backwards compatibility. This problem is + * part of why Stream and Serial should be deprecated. + */ bool readable() { return SerialBase::readable(); From 6b3bf28d0d54fd377ed7c61b1e500d99685be5ec Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Wed, 17 Oct 2018 17:26:39 -0500 Subject: [PATCH 09/12] Move inline code snippets to code blocks --- platform/DirHandle.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/platform/DirHandle.h b/platform/DirHandle.h index d0b04d04f2..f61937df81 100644 --- a/platform/DirHandle.h +++ b/platform/DirHandle.h @@ -35,12 +35,18 @@ namespace mbed { * but only a subset needs to be provided. * * If a FileSystemLike class defines the opendir method, then the - * directories of an object of that type can be accessed by - * DIR *d = opendir("/example/directory") (or opendir("/example") - * to open the root of the filesystem), and then using readdir(d) etc. + * directories of an object of that type can be accessed by either: + * @code + * DIR *d = opendir("/example/directory"); + * @endcode + * or + * @code + * DIR *d = opendir("/example"); + * @endcode + * to open the root of the file system. * * The root directory is considered to contain all FileHandle and - * FileSystem objects, so the DIR* returned by opendir("/") will + * FileSystem objects, so the DIR pointer returned by opendir("/") will * reflect this. * * @note to create a directory, @see Dir From 7d604fedf8ff1e0056258293cf174fd91000f2b6 Mon Sep 17 00:00:00 2001 From: Amanda Butler Date: Wed, 17 Oct 2018 17:41:27 -0500 Subject: [PATCH 10/12] Fix typo in DirHandle.md Add "s" for agreement. --- platform/DirHandle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/DirHandle.h b/platform/DirHandle.h index f61937df81..2c6cf2fb15 100644 --- a/platform/DirHandle.h +++ b/platform/DirHandle.h @@ -119,7 +119,7 @@ public: return close(); }; - /** Return the directory entry at the current position, and + /** Returns the directory entry at the current position, and * advances the position to the next entry. * * @returns From 0d278e7ceed55bbfcb6d3b7d2e67091a17f31370 Mon Sep 17 00:00:00 2001 From: Jaakko Korhonen Date: Thu, 18 Oct 2018 11:21:58 +0300 Subject: [PATCH 11/12] EventQueue documentation fix. --- events/mbed_shared_queues.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/events/mbed_shared_queues.h b/events/mbed_shared_queues.h index fea0d0000f..1535c39845 100644 --- a/events/mbed_shared_queues.h +++ b/events/mbed_shared_queues.h @@ -75,7 +75,7 @@ events::EventQueue *mbed_event_queue(); * @note * mbed_highprio_event_queue is not itself IRQ safe. To use the * mbed_highprio_event_queue in interrupt context, you must first call - * `mbed_event_queue()` in threaded context and store the pointer for + * `mbed_highprio_event_queue()` in threaded context and store the pointer for * later use. * * @return pointer to high-priority event queue From 1f9ef364835eef2a37cbad3c6e5db23357adee89 Mon Sep 17 00:00:00 2001 From: Amanda Butler Date: Thu, 18 Oct 2018 11:11:03 -0500 Subject: [PATCH 12/12] Edit DirHandle.h Edit for active voice. --- platform/DirHandle.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/DirHandle.h b/platform/DirHandle.h index 2c6cf2fb15..d40300e360 100644 --- a/platform/DirHandle.h +++ b/platform/DirHandle.h @@ -30,12 +30,12 @@ namespace mbed { */ -/** Represents a directory stream. Objects of this type are returned - * by an opendir function. The core functions are read and seek, +/** Represents a directory stream. An opendir function returns + * objects of this type. The core functions are read and seek, * but only a subset needs to be provided. * - * If a FileSystemLike class defines the opendir method, then the - * directories of an object of that type can be accessed by either: + * If a FileSystemLike class defines the opendir method, then you + * can access the directories of an object of that type by either: * @code * DIR *d = opendir("/example/directory"); * @endcode @@ -46,8 +46,8 @@ namespace mbed { * to open the root of the file system. * * The root directory is considered to contain all FileHandle and - * FileSystem objects, so the DIR pointer returned by opendir("/") will - * reflect this. + * FileSystem objects, so the DIR pointer returned by opendir("/") + * reflects this. * * @note to create a directory, @see Dir * @note Synchronization level: Set by subclass