aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/lib/peripherals
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/lib/peripherals')
-rw-r--r--os/hal/lib/peripherals/flash/hal_flash.c16
-rw-r--r--os/hal/lib/peripherals/flash/hal_flash.h4
2 files changed, 16 insertions, 4 deletions
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.