Resolving doxygen warnings

pull/4450/head
Deepika Bhavnani 2017-06-02 13:18:40 -05:00 committed by Deepika
parent 072a227bc9
commit f05e498c73
4 changed files with 43 additions and 19 deletions

View File

@ -171,6 +171,9 @@ public:
* The default is blocking. * The default is blocking.
* *
* @param blocking true for blocking mode, false for non-blocking mode. * @param blocking true for blocking mode, false for non-blocking mode.
*
* @return 0 on success
* @return Negative error code on failure
*/ */
virtual int set_blocking(bool blocking) virtual int set_blocking(bool blocking)
{ {
@ -185,8 +188,7 @@ public:
* *
* @param events bitmask of poll events we're interested in - POLLIN/POLLOUT etc. * @param events bitmask of poll events we're interested in - POLLIN/POLLOUT etc.
* *
* @returns * @returns bitmask of poll events that have occurred.
* bitmask of poll events that have occurred.
*/ */
virtual short poll(short events) const virtual short poll(short events) const
{ {
@ -194,20 +196,22 @@ public:
return POLLIN | POLLOUT; return POLLIN | POLLOUT;
} }
/** Returns true if the FileHandle is writable. /** Definition depends upon the subclass implementing FileHandle.
* Definition depends upon the subclass implementing FileHandle.
* For example, if the FileHandle is of type Stream, writable() could return * For example, if the FileHandle is of type Stream, writable() could return
* true when there is ample buffer space available for write() calls. * true when there is ample buffer space available for write() calls.
*
* @returns true if the FileHandle is writable.
*/ */
bool writable() const bool writable() const
{ {
return poll(POLLOUT) & POLLOUT; return poll(POLLOUT) & POLLOUT;
} }
/** Returns true if the FileHandle is readable. /** Definition depends upon the subclass implementing FileHandle.
* Definition depends upon the subclass implementing FileHandle.
* For example, if the FileHandle is of type Stream, readable() could return * For example, if the FileHandle is of type Stream, readable() could return
* true when there is something available to read. * true when there is something available to read.
*
* @returns true when there is something available to read.
*/ */
bool readable() const bool readable() const
{ {
@ -239,11 +243,13 @@ public:
/** Not a member function /** Not a member function
* This call is equivalent to posix fdopen(). * This call is equivalent to posix fdopen().
* Returns a pointer to std::FILE.
* It associates a Stream to an already opened file descriptor (FileHandle) * It associates a Stream to an already opened file descriptor (FileHandle)
* *
* @param fh a pointer to an opened file descriptor * @param fh a pointer to an opened file descriptor
* @param mode operation upon the file descriptor, e.g., 'wb+'*/ * @param mode operation upon the file descriptor, e.g., 'wb+'
*
* @returns a pointer to std::FILE
*/
std::FILE *fdopen(FileHandle *fh, const char *mode); std::FILE *fdopen(FileHandle *fh, const char *mode);

View File

@ -19,7 +19,12 @@
#ifndef MBED_ERROR_H #ifndef MBED_ERROR_H
#define MBED_ERROR_H #define MBED_ERROR_H
/** To generate a fatal compile-time error, you can use the pre-processor #error directive. /** To generate a fatal compile-time error, you can use the pre-processor #error directive.
*
* @param format C string that contains data stream to be printed.
* Code snippets below show valid format.
* *
* @code * @code
* #error "That shouldn't have happened!" * #error "That shouldn't have happened!"
@ -54,12 +59,13 @@
* error("expected x to be less than 5, but got %d", x); * error("expected x to be less than 5, but got %d", x);
* } * }
* @endcode * @endcode
*
*
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void error(const char* format, ...); void error(const char* format, ...);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -113,9 +113,17 @@ void mbed_mac_address(char *mac);
void mbed_die(void); void mbed_die(void);
/** Print out an error message. This is typically called when /** Print out an error message. This is typically called when
* hanlding a crash. * handling a crash.
* *
* @note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
*
* @param format C string that contains data stream to be printed.
* Code snippets below show valid format.
*
* @code
* mbed_error_printf("Failed: %s, file: %s, line %d \n", expr, file, line);
* @endcode
*
*/ */
void mbed_error_printf(const char* format, ...); void mbed_error_printf(const char* format, ...);
@ -123,6 +131,10 @@ void mbed_error_printf(const char* format, ...);
* but uses a va_list. * but uses a va_list.
* *
* @note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
*
* @param format C string that contains data stream to be printed.
* @param arg Variable arguments list
*
*/ */
void mbed_error_vfprintf(const char * format, va_list arg); void mbed_error_vfprintf(const char * format, va_list arg);

View File

@ -110,11 +110,11 @@ void mbed_mem_trace_free(void *ptr, void *caller);
* easily parsable by an external tool. For each memory operation, the callback * easily parsable by an external tool. For each memory operation, the callback
* outputs a line that begins with "#<op>:<0xresult>;<0xcaller>-": * outputs a line that begins with "#<op>:<0xresult>;<0xcaller>-":
* *
* - 'op' identifies the memory operation ('m' for 'malloc', 'r' for 'realloc', * @param op identifies the memory operation ('m' for 'malloc', 'r' for 'realloc',
* 'c' for 'calloc' and 'f' for 'free'). * 'c' for 'calloc' and 'f' for 'free').
* - 'result' (base 16) is the result of the memor operation. This is always NULL * @param res (base 16) is the result of the memor operation. This is always NULL
* for 'free', since 'free' doesn't return anything. * for 'free', since 'free' doesn't return anything.
* - 'caller' (base 16) is the caller of the memory operation. Note that the value * @param caller (base 16) is the caller of the memory operation. Note that the value
* of 'caller' might be unreliable. * of 'caller' might be unreliable.
* *
* The rest of the output depends on the operation being traced: * The rest of the output depends on the operation being traced: