Fix doxygen warnings in 'features/filesystem'

pull/4450/head
Deepika 2017-06-05 09:29:41 -05:00
parent f05e498c73
commit 6ee4c7e219
7 changed files with 30 additions and 16 deletions

View File

@ -58,13 +58,12 @@ public:
/** Close a directory /** Close a directory
* *
* return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
virtual int close(); virtual int close();
/** Read the next directory entry /** Read the next directory entry
* *
* @param path The buffer to read the null terminated path name in to
* @param ent The directory entry to fill out * @param ent The directory entry to fill out
* @return 1 on reading a filename, 0 at end of directory, negative error on failure * @return 1 on reading a filename, 0 at end of directory, negative error on failure
*/ */

View File

@ -44,11 +44,13 @@ class File;
* Implementations must provide at minimum file operations and mount * Implementations must provide at minimum file operations and mount
* operations for block devices. * operations for block devices.
* *
* @Note Synchronization level: Set by subclass * @note Synchronization level: Set by subclass
*/ */
class FileSystem : public FileSystemLike { class FileSystem : public FileSystemLike {
public: public:
/** FileSystem lifetime /** FileSystem lifetime
*
* @param name Name to add filesystem to tree as
*/ */
FileSystem(const char *name = NULL); FileSystem(const char *name = NULL);
virtual ~FileSystem() {} virtual ~FileSystem() {}
@ -114,7 +116,7 @@ protected:
/** Close a file /** Close a file
* *
* @param file File handle * @param file File handle
* return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
virtual int file_close(fs_file_t file) = 0; virtual int file_close(fs_file_t file) = 0;
@ -195,7 +197,7 @@ protected:
/** Close a directory /** Close a directory
* *
* @param dir Dir handle * @param dir Dir handle
* return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
virtual int dir_close(fs_dir_t dir); virtual int dir_close(fs_dir_t dir);

View File

@ -43,6 +43,7 @@
* // contains 96 blocks of size 512 bytes * // contains 96 blocks of size 512 bytes
* BlockDevice *bds[] = {&mem1, &mem2}; * BlockDevice *bds[] = {&mem1, &mem2};
* ChainingBlockDevice chainmem(bds); * ChainingBlockDevice chainmem(bds);
* @endcode
*/ */
class ChainingBlockDevice : public BlockDevice class ChainingBlockDevice : public BlockDevice
{ {
@ -50,7 +51,7 @@ public:
/** Lifetime of the memory block device /** Lifetime of the memory block device
* *
* @param bds Array of block devices to chain with sequential block addresses * @param bds Array of block devices to chain with sequential block addresses
* @param count Number of block devices to chain * @param bd_count Number of block devices to chain
* @note All block devices must have the same block size * @note All block devices must have the same block size
*/ */
ChainingBlockDevice(BlockDevice **bds, size_t bd_count); ChainingBlockDevice(BlockDevice **bds, size_t bd_count);
@ -69,8 +70,6 @@ public:
/** Lifetime of the memory block device /** Lifetime of the memory block device
* *
* @param bds Array of block devices to chain with sequential block addresses
* @note All block devices must have the same block size
*/ */
virtual ~ChainingBlockDevice() {} virtual ~ChainingBlockDevice() {}

View File

@ -44,14 +44,25 @@
* printf("%s", block); * printf("%s", block);
* bd.deinit(); * bd.deinit();
* } * }
* @endcode
*/ */
class HeapBlockDevice : public BlockDevice class HeapBlockDevice : public BlockDevice
{ {
public: public:
/** Lifetime of the memory block device /** Lifetime of the memory block device
*
* @param size Size of the Block Device in bytes
* @param block Block size in bytes
*/ */
HeapBlockDevice(bd_size_t size, bd_size_t block=512); HeapBlockDevice(bd_size_t size, bd_size_t block=512);
/** Lifetime of the memory block device
*
* @param size Size of the Block Device in bytes
* @param read Minimum read size required in bytes
* @param program Minimum program size required in bytes
* @param erase Minimum erase size required in bytes
*/
HeapBlockDevice(bd_size_t size, bd_size_t read, bd_size_t program, bd_size_t erase); HeapBlockDevice(bd_size_t size, bd_size_t read, bd_size_t program, bd_size_t erase);
virtual ~HeapBlockDevice(); virtual ~HeapBlockDevice();

View File

@ -44,6 +44,7 @@
* *
* // Create a block device that maps to the middle 32 blocks * // Create a block device that maps to the middle 32 blocks
* SlicingBlockDevice slice3(&mem, 16*512, -16*512); * SlicingBlockDevice slice3(&mem, 16*512, -16*512);
* @endcode
*/ */
class SlicingBlockDevice : public BlockDevice class SlicingBlockDevice : public BlockDevice
{ {
@ -62,7 +63,7 @@ public:
* @param bd Block device to back the SlicingBlockDevice * @param bd Block device to back the SlicingBlockDevice
* @param start Start block address to map to block 0, negative addresses * @param start Start block address to map to block 0, negative addresses
* are calculated from the end of the underlying block device * are calculated from the end of the underlying block device
* @param stop End block address to mark the end of the block device, * @param end End block address to mark the end of the block device,
* this block is not mapped, negative addresses are * this block is not mapped, negative addresses are
* calculated from the end of the underlying block device * calculated from the end of the underlying block device
*/ */

View File

@ -57,6 +57,8 @@ public:
* volume and upto 16MiB for exFAT volume. If zero is given, * volume and upto 16MiB for exFAT volume. If zero is given,
* the default allocation unit size is selected by the underlying * the default allocation unit size is selected by the underlying
* filesystem, which depends on the volume size. * filesystem, which depends on the volume size.
*
* @return 0 on success, negative error code on failure
*/ */
static int format(BlockDevice *bd, int allocation_unit = 0); static int format(BlockDevice *bd, int allocation_unit = 0);
@ -126,7 +128,7 @@ protected:
/** Close a file /** Close a file
* *
* @param file File handle * @param file File handle
* return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
virtual int file_close(fs_file_t file); virtual int file_close(fs_file_t file);
@ -134,7 +136,7 @@ protected:
* *
* @param file File handle * @param file File handle
* @param buffer The buffer to read in to * @param buffer The buffer to read in to
* @param size The number of bytes to read * @param len The number of bytes to read
* @return The number of bytes read, 0 at end of file, negative error on failure * @return The number of bytes read, 0 at end of file, negative error on failure
*/ */
virtual ssize_t file_read(fs_file_t file, void *buffer, size_t len); virtual ssize_t file_read(fs_file_t file, void *buffer, size_t len);
@ -143,7 +145,7 @@ protected:
* *
* @param file File handle * @param file File handle
* @param buffer The buffer to write from * @param buffer The buffer to write from
* @param size The number of bytes to write * @param len The number of bytes to write
* @return The number of bytes written, negative error on failure * @return The number of bytes written, negative error on failure
*/ */
virtual ssize_t file_write(fs_file_t file, const void *buffer, size_t len); virtual ssize_t file_write(fs_file_t file, const void *buffer, size_t len);
@ -192,7 +194,7 @@ protected:
/** Close a directory /** Close a directory
* *
* @param dir Dir handle * @param dir Dir handle
* return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
virtual int dir_close(fs_dir_t dir); virtual int dir_close(fs_dir_t dir);

View File

@ -54,7 +54,7 @@ public:
/** Close a directory /** Close a directory
* *
* return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
virtual int close() = 0; virtual int close() = 0;