Skip to content

Commit

Permalink
Doxygen comment typo correction
Browse files Browse the repository at this point in the history
  • Loading branch information
oyama committed Jun 13, 2024
1 parent 14e64fd commit 7d60a41
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 64 deletions.
14 changes: 7 additions & 7 deletions include/blockdevice/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ extern "C" {
#include <stdint.h>
#include "blockdevice/blockdevice.h"

/** Create Raspberry Pi Pico On-board Flash block device
/*! \brief Create Raspberry Pi Pico On-board Flash block device
*
* Create a block device object that uses the Raspberry Pi Pico onboard flash memory. The start position of the flash memory to be allocated to the block device is specified by start and the length by length. start and length must be aligned to a flash sector of 4096 bytes.
*
* @param start Specifies the starting position of the flash memory to be allocated to the block device in bytes.
* @param length Size in bytes to be allocated to the block device. If zero is specified, all remaining space is used.
* @return Block device object. Returnes NULL in case of failure.
* @retval NUL Failed to create block device object.
* \param start Specifies the starting position of the flash memory to be allocated to the block device in bytes.
* \param length Size in bytes to be allocated to the block device. If zero is specified, all remaining space is used.
* \return Block device object. Returnes NULL in case of failure.
* \retval NULL Failed to create block device object.
*/
blockdevice_t *blockdevice_flash_create(uint32_t start, size_t length);

/** Release the flash memory device.
/*! \brief Release the flash memory device.
*
* @param device Block device object.
* \param device Block device object.
*/
void blockdevice_flash_free(blockdevice_t *device);

Expand Down
12 changes: 6 additions & 6 deletions include/blockdevice/heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ extern "C" {
#include <stdint.h>
#include "blockdevice/blockdevice.h"

/** Create RAM heap memory block device
/*! \brief Create RAM heap memory block device
*
* Create a block device object that uses RAM heap memory. The size of heap memory allocated to the block device is specified by size.
*
* @param size Size in bytes to be allocated to the block device.
* @return Block device object. Returnes NULL in case of failure.
* @retval NUL Failed to create block device object.
* \param size Size in bytes to be allocated to the block device.
* \return Block device object. Returnes NULL in case of failure.
* \retval NULL Failed to create block device object.
*/
blockdevice_t *blockdevice_heap_create(size_t size);

/** Release the heap memory device.
/*! \brief Release the heap memory device.
*
* @param device Block device object.
* \param device Block device object.
*/
void blockdevice_heap_free(blockdevice_t *device);

Expand Down
16 changes: 8 additions & 8 deletions include/blockdevice/loopback.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ extern "C" {
#include <stdint.h>
#include "blockdevice/blockdevice.h"

/** Create loopback block device
/*! \brief Create loopback block device
*
* Create a loopback device object that uses a disk image file. Specify the file path allocated to the block device, as well as the maximum size capacity and block size block_size.
*
* @param path Disk image file path.
* @param capacity Maximum device size bytes.
* @param block_size Block size byte.
* @return Block device object. Returnes NULL in case of failure.
* @retval NUL Failed to create block device object.
* \param path Disk image file path.
* \param capacity Maximum device size bytes.
* \param block_size Block size byte.
* \return Block device object. Returnes NULL in case of failure.
* \retval NULL Failed to create block device object.
*/
blockdevice_t *blockdevice_loopback_create(const char *path, size_t capacity, size_t block_size);

/** Release the loopback device.
/*! \brief Release the loopback device.
*
* @param device Block device object.
* \param device Block device object.
*/
void blockdevice_loopback_free(blockdevice_t *device);

Expand Down
24 changes: 12 additions & 12 deletions include/blockdevice/sd.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ extern "C" {
#define CONF_SD_INIT_FREQUENCY (10 * 1000 * 1000)
#define CONF_SD_TRX_FREQUENCY (24 * MHZ)

/** Create SD card block device with SPI
/*! \brief Create SD card block device with SPI
*
* Create a block device object for an SPI-connected SD or MMC card.
*
* @param spi_inst SPI instance, as defined in the pico-sdk hardware_spi library
* @param mosi SPI Master Out Slave In(TX) pin
* @param miso SPI Master In Slave Out(RX) pin
* @param sckl SPI clock pin
* @param cs SPI Chip select pin
* @param hz SPI clock frequency (Hz)
* @param enable_crc Boolean value to enable CRC on read/write
* @return Block device object. Returnes NULL in case of failure.
* @retval NULL Failed to create block device object.
* \param spi_inst SPI instance, as defined in the pico-sdk hardware_spi library
* \param mosi SPI Master Out Slave In(TX) pin
* \param miso SPI Master In Slave Out(RX) pin
* \param sckl SPI clock pin
* \param cs SPI Chip select pin
* \param hz SPI clock frequency (Hz)
* \param enable_crc Boolean value to enable CRC on read/write
* \return Block device object. Returnes NULL in case of failure.
* \retval NULL Failed to create block device object.
*/
blockdevice_t *blockdevice_sd_create(spi_inst_t *spi_inst,
uint8_t mosi,
Expand All @@ -38,9 +38,9 @@ blockdevice_t *blockdevice_sd_create(spi_inst_t *spi_inst,
uint32_t hz,
bool enable_crc);

/** Release the SD card device.
/*! \brief Release the SD card device.
*
* @param device Block device object.
* \param device Block device object.
*/
void blockdevice_sd_free(blockdevice_t *device);

Expand Down
13 changes: 13 additions & 0 deletions include/filesystem/fat.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@ extern "C" {

#define FFS_DBG 0


/*! \brief Create FAT file system object
*
* Create FAT file system object.
*
* \return File system object. Returns NULL in case of failure.
* \retval NULL failed to create file system object.
*/
filesystem_t *filesystem_fat_create();

/*! \brief Release FAT file system object
*
* \param fs FAT file system object
*/
void filesystem_fat_free(filesystem_t *fs);

#ifdef __cplusplus
Expand Down
14 changes: 14 additions & 0 deletions include/filesystem/littlefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,21 @@ extern "C" {

#define LFS_DBG 0

/*! \brief Create littlefs file system object
*
* Create littlefs file system object.
*
* \param block_cycles Number of erase cycles before littlefs evicts metadata logs and moves the metadata to another block.
* \param lookahead_size Threshold for metadata compaction during lfs_fs_gc in bytes.
* \return File system object. Returns NULL in case of failure.
* \retval NULL failed to create file system object.
*/
filesystem_t *filesystem_littlefs_create(uint32_t block_cycles, lfs_size_t lookahead_size);

/*! \brief Release littlefs file system object
*
* \param fs littlefs file system object
*/
void filesystem_littlefs_free(filesystem_t *fs);

#ifdef __cplusplus
Expand Down
62 changes: 31 additions & 31 deletions include/filesystem/vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,75 +18,75 @@ extern "C" {
#define PICO_FS_DEFAULT_SIZE (1408 * 1024) // Can share storage with MicroPython for RP2
#endif

/** Enable predefined file systems
/*! \brief Enable predefined file systems
*
* This default function defines the block device and file system, formats it if necessary and then mounts it on `/` to make it available.
* The `pico_enable_filesystem` function in CMakeLists.txt provides a default or user-defined fs_init function.
*
* @retval true Init succeeded.
* @retval false Init failed.
* \retval true Init succeeded.
* \retval false Init failed.
*/
bool fs_init(void);

/** Format block device with specify file system
/*! \brief Format block device with specify file system
*
* Block devices can be formatted and made available as a file system.
*
* @param fs File system object. Format the block device according to the specified file system.
* @param device Block device used in the file system.
* @retval 0 Format succeeded.
* @retval -1 Format failed. Error codes are indicated by errno.
* \param fs File system object. Format the block device according to the specified file system.
* \param device Block device used in the file system.
* \retval 0 Format succeeded.
* \retval -1 Format failed. Error codes are indicated by errno.
*/
int fs_format(filesystem_t *fs, blockdevice_t *device);

/** Mount a file system
/*! \brief Mount a file system
*
* Mounts a file system with block devices at the specified path.
*
* @param path Directory path of the mount point. Specify a string beginning with a slash.
* @param fs File system object.
* @param device Block device used in the file system. Block devices must be formatted with a file system.
* @retval 0 Mount succeeded.
* @retval -1 Mount failed. Error codes are indicated by errno.
* \param path Directory path of the mount point. Specify a string beginning with a slash.
* \param fs File system object.
* \param device Block device used in the file system. Block devices must be formatted with a file system.
* \retval 0 Mount succeeded.
* \retval -1 Mount failed. Error codes are indicated by errno.
*/
int fs_mount(const char *path, filesystem_t *fs, blockdevice_t *device);

/** Dismount a file system
/*! \brief Dismount a file system
*
* Dismount a file system.
*
* @param path Directory path of the mount point. Must be the same as the path specified for the mount.
* @retval 0 Dismount succeeded.
* @retval -1 Dismount failed. Error codes are indicated by errno.
* \param path Directory path of the mount point. Must be the same as the path specified for the mount.
* \retval 0 Dismount succeeded.
* \retval -1 Dismount failed. Error codes are indicated by errno.
*/
int fs_unmount(const char *path);

/** Reformat the mounted file system
/*! \brief Reformat the mounted file system
*
* Reformat a file system mounted at the specified path.
*
* @param path Directory path of the mount point. Must be the same as the path specified for the mount.
* @retval 0 Reformat suceeded.
* @retval -1 Reformat failed. Error codes are indicated by errno.
* \param path Directory path of the mount point. Must be the same as the path specified for the mount.
* \retval 0 Reformat suceeded.
* \retval -1 Reformat failed. Error codes are indicated by errno.
*/
int fs_reformat(const char *path);

/** Lookup filesystem and blockdevice objects from a mount point
/*! \brief Lookup filesystem and blockdevice objects from a mount point
*
* @param path Directory path of the mount point. Must be the same as the path specified for the mount.
* @param fs Pointer references to filesystem objects
* @param device Pinter references to blockdevice objects
* @retval 0 Lookup succeeded
* @retval -1 Lookup failed. Error codes are indicated by errno.
* \param path Directory path of the mount point. Must be the same as the path specified for the mount.
* \param fs Pointer references to filesystem objects
* \param device Pinter references to blockdevice objects
* \retval 0 Lookup succeeded
* \retval -1 Lookup failed. Error codes are indicated by errno.
*/
int fs_info(const char *path, filesystem_t **fs, blockdevice_t **device);

/** File system error message
/*! \brief File system error message
*
* Convert the error code reported in the negative integer into a string.
*
* @param error Negative error code returned by the file system.
* @return Pointer to the corresponding message string.
* \param error Negative error code returned by the file system.
* \return Pointer to the corresponding message string.
*/
char *fs_strerror(int error);

Expand Down

0 comments on commit 7d60a41

Please sign in to comment.