From 291f788fbcbc2749a5240a38f74cd4b906c6c4fd Mon Sep 17 00:00:00 2001 From: roccomarco Date: Sun, 2 Jul 2017 09:29:51 +0000 Subject: Improved ChibiOS\EX documentation (almost complete) git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10285 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/lib/peripherals/flash/hal_flash.c | 16 ++++++++++++++-- os/hal/lib/peripherals/flash/hal_flash.h | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'os/hal/lib') diff --git a/os/hal/lib/peripherals/flash/hal_flash.c b/os/hal/lib/peripherals/flash/hal_flash.c index ce03624cc..7bc0845bb 100644 --- a/os/hal/lib/peripherals/flash/hal_flash.c +++ b/os/hal/lib/peripherals/flash/hal_flash.c @@ -50,7 +50,10 @@ * @brief Waits until the current erase operation is finished. * * @param[in] devp pointer to a @p BaseFlash object - * @param[in] cb polling callback or @p NULL + * + * @return An error code. + * @retval FLASH_NO_ERROR if there is no erase operation in progress. + * @retval FLASH_ERROR_ERASE if the erase operation failed. */ flash_error_t flashWaitErase(BaseFlash *devp) { @@ -71,6 +74,11 @@ flash_error_t flashWaitErase(BaseFlash *devp) { /** * @brief Returns the offset of a sector. + * + * @param[in] devp pointer to a @p BaseFlash object + * @param[in] sector flash sector number + * + * @return the offset of the sector */ flash_offset_t flashGetSectorOffset(BaseFlash *devp, flash_sector_t sector) { @@ -91,6 +99,11 @@ flash_offset_t flashGetSectorOffset(BaseFlash *devp, /** * @brief Returns the size of a sector. + * + * @param[in] devp pointer to a @p BaseFlash object + * @param[in] sector flash sector number + * + * @return the size of the sector */ uint32_t flashGetSectorSize(BaseFlash *devp, flash_sector_t sector) { @@ -108,5 +121,4 @@ uint32_t flashGetSectorSize(BaseFlash *devp, return size; } - /** @} */ diff --git a/os/hal/lib/peripherals/flash/hal_flash.h b/os/hal/lib/peripherals/flash/hal_flash.h index f7066e2ef..f6e83d580 100644 --- a/os/hal/lib/peripherals/flash/hal_flash.h +++ b/os/hal/lib/peripherals/flash/hal_flash.h @@ -200,7 +200,7 @@ typedef struct { * @brief Sensors get axes number. * * @param[in] ip pointer to a @p BaseFlash or derived class - * @return An error code. + * @return A flash device descriptor. * * @api */ @@ -230,7 +230,7 @@ typedef struct { * @param[in] ip pointer to a @p BaseFlash or derived class * @param[in] offset flash offset * @param[in] n number of bytes to be programmed - * @param[in] wp pointer to the data buffer + * @param[in] pp pointer to the data buffer * @return An error code. * @retval FLASH_NO_ERROR if there is no erase operation in progress. * @retval FLASH_BUSY_ERASING if there is an erase operation in progress. -- cgit v1.2.3