Skip to content

Commit 8485de9

Browse files
author
Cruz Monrreal
authored
Merge pull request #8475 from cmonr/rollup
Rollup PR
2 parents 83dada3 + 1febe31 commit 8485de9

File tree

6 files changed

+41
-24
lines changed

6 files changed

+41
-24
lines changed

UNITTESTS/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Unit tests test code in small sections on a host machine. Unlike other testing t
1111
Please install the following dependencies to use Mbed OS unit testing.
1212

1313
- GNU toolchains.
14-
- GCC 6 or later. We recommend you use MinGW-W64 on Windows, but any Windows port of the above GCC versions works.
14+
- 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.
1515
- CMake 3.0 or newer.
1616
- Python 2.7.x, 3.5 or newer.
1717
- Pip 10.0 or newer.
@@ -35,7 +35,8 @@ Detailed instructions for supported operating systems are below.
3535
#### Installing dependencies on macOS
3636

3737
1. Install [Homebrew](https://brew.sh/).
38-
1. Install GCC compilers and CMake with: `brew install gcc cmake`.
38+
1. Install Xcode Command Line Tools with `xcode-select --install`.
39+
1. Install CMake with: `brew install cmake`.
3940
1. Install Python and Pip:
4041

4142
```
@@ -44,6 +45,7 @@ Detailed instructions for supported operating systems are below.
4445
```
4546

4647
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`.
48+
1. (Optional) Install GCC with `brew install gcc`.
4749

4850
#### Installing dependencies on Windows
4951

@@ -200,3 +202,6 @@ Use Mbed CLI to generate code coverage reports. For advanced use, follow these s
200202

201203
**Problem:** Virus protection identifies files generated by CMake as malicious and quarantines the files on Windows.
202204
* **Solution**: Restore the false positive files from the quarantine.
205+
206+
**Problem:** CMake compiler check fails on Mac OS Mojave when using GCC-8.
207+
* **Solution**: Make sure gnm (binutils) is not installed. Uninstall binutils with `brew uninstall binutils`.

drivers/PwmOut.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace mbed {
3232
*
3333
* Example
3434
* @code
35-
* // Fade a led on.
35+
* // Gradually change the intensity of the LED.
3636
* #include "mbed.h"
3737
*
3838
* PwmOut led(LED1);
@@ -118,8 +118,8 @@ class PwmOut {
118118
core_util_critical_section_exit();
119119
}
120120

121-
/** Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same.
122-
* @param ms Change the period of a PWM signal in milli-seconds without modifying the duty cycle
121+
/** Set the PWM period, specified in milliseconds (int), keeping the duty cycle the same.
122+
* @param ms Change the period of a PWM signal in milliseconds without modifying the duty cycle
123123
*/
124124
void period_ms(int ms)
125125
{
@@ -128,8 +128,8 @@ class PwmOut {
128128
core_util_critical_section_exit();
129129
}
130130

131-
/** Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same.
132-
* @param us Change the period of a PWM signal in micro-seconds without modifying the duty cycle
131+
/** Set the PWM period, specified in microseconds (int), keeping the duty cycle the same.
132+
* @param us Change the period of a PWM signal in microseconds without modifying the duty cycle
133133
*/
134134
void period_us(int us)
135135
{
@@ -148,8 +148,8 @@ class PwmOut {
148148
core_util_critical_section_exit();
149149
}
150150

151-
/** Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same.
152-
* @param ms Change the pulse width of a PWM signal specified in milli-seconds
151+
/** Set the PWM pulsewidth, specified in milliseconds (int), keeping the period the same.
152+
* @param ms Change the pulse width of a PWM signal specified in milliseconds
153153
*/
154154
void pulsewidth_ms(int ms)
155155
{
@@ -158,8 +158,8 @@ class PwmOut {
158158
core_util_critical_section_exit();
159159
}
160160

161-
/** Set the PWM pulsewidth, specified in micro-seconds (int), keeping the period the same.
162-
* @param us Change the pulse width of a PWM signal specified in micro-seconds
161+
/** Set the PWM pulsewidth, specified in microseconds (int), keeping the period the same.
162+
* @param us Change the pulse width of a PWM signal specified in microseconds
163163
*/
164164
void pulsewidth_us(int us)
165165
{
@@ -197,6 +197,7 @@ class PwmOut {
197197
return read();
198198
}
199199

200+
#if !(DOXYGEN_ONLY)
200201
protected:
201202
/** Lock deep sleep only if it is not yet locked */
202203
void lock_deep_sleep()
@@ -219,6 +220,7 @@ class PwmOut {
219220
pwmout_t _pwm;
220221
bool _deep_sleep_locked;
221222
};
223+
#endif
222224

223225
} // namespace mbed
224226

drivers/RawSerial.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class RawSerial: public SerialBase, private NonCopyable<RawSerial> {
8888

8989
int printf(const char *format, ...);
9090

91+
#if !(DOXYGEN_ONLY)
9192
protected:
9293

9394
/* Acquire exclusive access to this serial port
@@ -97,6 +98,7 @@ class RawSerial: public SerialBase, private NonCopyable<RawSerial> {
9798
/* Release exclusive access to this serial port
9899
*/
99100
virtual void unlock(void);
101+
#endif
100102
};
101103

102104
} // namespace mbed

drivers/Serial.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ class Serial : public SerialBase, public Stream, private NonCopyable<Serial> {
6363
* @param tx Transmit pin
6464
* @param rx Receive pin
6565
* @param name The name of the stream associated with this serial port (optional)
66-
* @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE)
66+
* @param baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE or 9600)
6767
*
6868
* @note
69-
* Either tx or rx may be specified as NC if unused
69+
* Either tx or rx may be specified as NC (Not Connected) if unused
7070
*/
7171
Serial(PinName tx, PinName rx, const char *name = NULL, int baud = MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE);
7272

@@ -78,7 +78,7 @@ class Serial : public SerialBase, public Stream, private NonCopyable<Serial> {
7878
* @param baud The baud rate of the serial port
7979
*
8080
* @note
81-
* Either tx or rx may be specified as NC if unused
81+
* Either tx or rx may be specified as NC (Not Connected) if unused
8282
*/
8383
Serial(PinName tx, PinName rx, int baud);
8484

@@ -99,13 +99,15 @@ class Serial : public SerialBase, public Stream, private NonCopyable<Serial> {
9999
return SerialBase::writeable();
100100
}
101101

102+
#if !(DOXYGEN_ONLY)
102103
protected:
103104
virtual int _getc();
104105
virtual int _putc(int c);
105106
virtual void lock();
106107
virtual void unlock();
107108

108109
PlatformMutex _mutex;
110+
#endif
109111
};
110112

111113
} // namespace mbed

events/mbed_shared_queues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ events::EventQueue *mbed_event_queue();
7575
* @note
7676
* mbed_highprio_event_queue is not itself IRQ safe. To use the
7777
* mbed_highprio_event_queue in interrupt context, you must first call
78-
* `mbed_event_queue()` in threaded context and store the pointer for
78+
* `mbed_highprio_event_queue()` in threaded context and store the pointer for
7979
* later use.
8080
*
8181
* @return pointer to high-priority event queue

platform/DirHandle.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,24 @@ namespace mbed {
3030
*/
3131

3232

33-
/** Represents a directory stream. Objects of this type are returned
34-
* by an opendir function. The core functions are read and seek,
33+
/** Represents a directory stream. An opendir function returns
34+
* objects of this type. The core functions are read and seek,
3535
* but only a subset needs to be provided.
3636
*
37-
* If a FileSystemLike class defines the opendir method, then the
38-
* directories of an object of that type can be accessed by
39-
* DIR *d = opendir("/example/directory") (or opendir("/example")
40-
* to open the root of the filesystem), and then using readdir(d) etc.
37+
* If a FileSystemLike class defines the opendir method, then you
38+
* can access the directories of an object of that type by either:
39+
* @code
40+
* DIR *d = opendir("/example/directory");
41+
* @endcode
42+
* or
43+
* @code
44+
* DIR *d = opendir("/example");
45+
* @endcode
46+
* to open the root of the file system.
4147
*
4248
* The root directory is considered to contain all FileHandle and
43-
* FileSystem objects, so the DIR* returned by opendir("/") will
44-
* reflect this.
49+
* FileSystem objects, so the DIR pointer returned by opendir("/")
50+
* reflects this.
4551
*
4652
* @note to create a directory, @see Dir
4753
* @note Synchronization level: Set by subclass
@@ -113,7 +119,7 @@ class DirHandle : private NonCopyable<DirHandle> {
113119
return close();
114120
};
115121

116-
/** Return the directory entry at the current position, and
122+
/** Returns the directory entry at the current position, and
117123
* advances the position to the next entry.
118124
*
119125
* @returns

0 commit comments

Comments
 (0)