Skip to content

Commit d898c11

Browse files
committed
api - doxygen improvements, unused parameters fixes
This patch is taken from mbed-drivers master.
1 parent b32f7a9 commit d898c11

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

hal/api/CThunk.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
* See the License for the specific language governing permissions and
2020
* limitations under the License.
2121
*/
22+
23+
/* General C++ Object Thunking class
24+
*
25+
* - allows direct callbacks to non-static C++ class functions
26+
* - keeps track for the corresponding class instance
27+
* - supports an optional context parameter for the called function
28+
* - ideally suited for class object receiving interrupts (NVIC_SetVector)
29+
*/
30+
2231
#ifndef __CTHUNK_H__
2332
#define __CTHUNK_H__
2433

hal/api/DirHandle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class DirHandle {
8282
*
8383
* @param location The location to seek to. Must be a value returned by telldir.
8484
*/
85-
virtual void seekdir(off_t location) { }
85+
virtual void seekdir(off_t location) { (void)location;}
8686

8787
virtual ~DirHandle() {}
8888
};

hal/api/FileSystemLike.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class FileSystemLike : public FileBase {
6161
* @param filename the name of the file to remove.
6262
* @param returns 0 on success, -1 on failure.
6363
*/
64-
virtual int remove(const char *filename) { return -1; };
64+
virtual int remove(const char *filename) { (void) filename; return -1; };
6565

6666
/** Rename a file in the filesystem.
6767
*
@@ -72,7 +72,7 @@ class FileSystemLike : public FileBase {
7272
* 0 on success,
7373
* -1 on failure.
7474
*/
75-
virtual int rename(const char *oldname, const char *newname) { return -1; };
75+
virtual int rename(const char *oldname, const char *newname) { (void) oldname, (void) newname; return -1; };
7676

7777
/** Opens a directory in the filesystem and returns a DirHandle
7878
* representing the directory stream.
@@ -83,7 +83,7 @@ class FileSystemLike : public FileBase {
8383
* A DirHandle representing the directory stream, or
8484
* NULL on failure.
8585
*/
86-
virtual DirHandle *opendir(const char *name) { return NULL; };
86+
virtual DirHandle *opendir(const char *name) { (void) name; return NULL; };
8787

8888
/** Creates a directory in the filesystem.
8989
*
@@ -94,7 +94,7 @@ class FileSystemLike : public FileBase {
9494
* 0 on success,
9595
* -1 on failure.
9696
*/
97-
virtual int mkdir(const char *name, mode_t mode) { return -1; }
97+
virtual int mkdir(const char *name, mode_t mode) { (void) name, (void) mode; return -1; }
9898

9999
// TODO other filesystem functions (mkdir, rm, rn, ls etc)
100100
};

hal/api/mbed.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
// mbed Debug libraries
2828
#include "mbed_error.h"
2929
#include "mbed_interface.h"
30+
#include "mbed_assert.h"
3031

3132
// mbed Peripheral components
3233
#include "DigitalIn.h"

0 commit comments

Comments
 (0)