-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix doxygen for Serial and RawSerial #8413
Changes from all commits
84dad6c
20f913a
9a7f359
5ee5b07
b31bc76
383798b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,10 +63,10 @@ class Serial : public SerialBase, public Stream, private NonCopyable<Serial> { | |
* @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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How so "or 9600"? I guess you mean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kjbracey-arm Yeah, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kjbracey-arm I wanted to add the |
||
* | ||
* @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 @@ class Serial : public SerialBase, public Stream, private NonCopyable<Serial> { | |
* @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); | ||
|
||
|
@@ -99,13 +99,15 @@ class Serial : public SerialBase, public Stream, private NonCopyable<Serial> { | |
return SerialBase::writeable(); | ||
} | ||
|
||
#if !(DOXYGEN_ONLY) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think If you're globally trying to exclude protected API methods (despite them being API), then does this trick work? https://stackoverflow.com/questions/11316663/is-it-possible-to-prevent-doxygen-from-outputting-protected-members/11316802 Also, as EXTRACT_ALL is off, aren't these just omitted by being undocumented anyway? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AnotherButler Can you help address the doxygen fanciness? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are not omitted. Our published site shows the protected member functions. This PR follows the method we know works. For further Doxygen questions, I suggest contacting @SenRamakri of the core OS team. The doxygen_options.json and doxyfile_options files live in mbed-os, and he typically knows a lot more about them than I do. @c1728p9 also recently put up a PR addressing Doxygen options and may also be able to help. |
||
protected: | ||
virtual int _getc(); | ||
virtual int _putc(int c); | ||
virtual void lock(); | ||
virtual void unlock(); | ||
|
||
PlatformMutex _mutex; | ||
#endif | ||
}; | ||
|
||
} // namespace mbed | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Protected methods are part of the API, so should really be documented.
These are overrides of the methods in
SerialBase
, so should be documented there - then if we have inheritance turned on, we don't need further documentation here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kjbracey-arm #8413 (comment)