doc: update disk API documentation
Fix disk access interface description and update disk API documentation. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
f205e94f9e
commit
5678189c27
|
@ -6,11 +6,10 @@ Disk Access
|
|||
Overview
|
||||
********
|
||||
|
||||
The disk access API provides access to storage disks, physical or in Flash or
|
||||
RAM.
|
||||
The disk access API provides access to storage devices.
|
||||
|
||||
Configuration Options
|
||||
*********************
|
||||
API Configuration Options
|
||||
*************************
|
||||
|
||||
Related configuration options:
|
||||
|
||||
|
@ -21,3 +20,16 @@ API Reference
|
|||
|
||||
.. doxygengroup:: disk_access_interface
|
||||
:project: Zephyr
|
||||
|
||||
Disk Driver Configuration Options
|
||||
*********************************
|
||||
|
||||
Related driver configuration options:
|
||||
|
||||
* :option:`CONFIG_DISK_DRIVERS`
|
||||
|
||||
Disk Driver Interface
|
||||
*********************
|
||||
|
||||
.. doxygengroup:: disk_driver_interface
|
||||
:project: Zephyr
|
||||
|
|
|
@ -26,30 +26,35 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief perform any initialization
|
||||
*
|
||||
* This call is made by the consumer before doing any IO calls so that the
|
||||
* disk or the backing device can do any initialization.
|
||||
*
|
||||
* @param[in] pdrv Disk name
|
||||
*
|
||||
* @return 0 on success, negative errno code on fail
|
||||
*/
|
||||
int disk_access_init(const char *pdrv);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief Get the status of disk
|
||||
*
|
||||
* This call is used to get the status of the disk
|
||||
*
|
||||
* @param[in] pdrv Disk name
|
||||
*
|
||||
* @return DISK_STATUS_OK or other DISK_STATUS_*s
|
||||
*/
|
||||
int disk_access_status(const char *pdrv);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief read data from disk
|
||||
*
|
||||
* Function to read data from disk to a memory buffer.
|
||||
*
|
||||
* @param[in] pdrv Disk name
|
||||
* @param[in] data_buf Pointer to the memory buffer to put data.
|
||||
* @param[in] start_sector Start disk sector to read from
|
||||
* @param[in] num_sector Number of disk sectors to read
|
||||
|
@ -59,11 +64,12 @@ int disk_access_status(const char *pdrv);
|
|||
int disk_access_read(const char *pdrv, uint8_t *data_buf,
|
||||
uint32_t start_sector, uint32_t num_sector);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief write data to disk
|
||||
*
|
||||
* Function write data from memory buffer to disk.
|
||||
*
|
||||
* @param[in] pdrv Disk name
|
||||
* @param[in] data_buf Pointer to the memory buffer
|
||||
* @param[in] start_sector Start disk sector to write to
|
||||
* @param[in] num_sector Number of disk sectors to write
|
||||
|
@ -73,12 +79,14 @@ int disk_access_read(const char *pdrv, uint8_t *data_buf,
|
|||
int disk_access_write(const char *pdrv, const uint8_t *data_buf,
|
||||
uint32_t start_sector, uint32_t num_sector);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief Get/Configure disk parameters
|
||||
*
|
||||
* Function to get disk parameters and make any special device requests.
|
||||
*
|
||||
* @param[in] cmd DISK_IOCTL_* code describing the request
|
||||
* @param[in] pdrv Disk name
|
||||
* @param[in] cmd DISK_IOCTL_* code describing the request
|
||||
* @param[in] buff Command data buffer
|
||||
*
|
||||
* @return 0 on success, negative errno code on fail
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue