![]() |
Modules | |
Implementation of USB host Mass Storage | |
Functions | |
uint8_t | uhi_msc_mem_get_lun (void) |
Gives the number of available LUN. | |
Ctrl_status | uhi_msc_mem_test_unit_ready (uint8_t lun) |
Checks and update the status of the LUN. | |
Ctrl_status | uhi_msc_mem_read_capacity (uint8_t lun, uint32_t *u32_nb_sector) |
Returns the capacity of the LUN. | |
uint8_t | uhi_msc_mem_read_sector_size (uint8_t lun) |
Returns the sector size of the LUN. | |
bool | uhi_msc_mem_wr_protect (uint8_t lun) |
Checks if the LUN is write protected. | |
bool | uhi_msc_mem_removal (void) |
Checks if the device is removed. | |
Ctrl_status | uhi_msc_mem_read_10_ram (uint32_t addr, void *ram) |
Reads 512 bytes from the current LUN. | |
Ctrl_status | uhi_msc_mem_write_10_ram (uint32_t addr, const void *ram) |
Writes 512 bytes to the current LUN. |
Layer added on UHI MSC interface to allow the usage of control access module. The control access module provides a common access at all memories and it is used by the File Systems available in ASF.
See Quick start guide for USB host mass-storage module (UHI MSC).
uint8_t uhi_msc_mem_get_lun | ( | void | ) |
Gives the number of available LUN.
Definition at line 86 of file uhi_msc_mem.c.
Ctrl_status uhi_msc_mem_read_10_ram | ( | uint32_t | addr, | |
void * | ram | |||
) |
Reads 512 bytes from the current LUN.
The LUN is selected by uhi_msc_mem_test_unit_ready() or uhi_msc_mem_read_capacity() function.
addr | Disk address (unit 512B) | |
ram | Pointer to store the data |
Definition at line 173 of file uhi_msc_mem.c.
Ctrl_status uhi_msc_mem_read_capacity | ( | uint8_t | lun, | |
uint32_t * | u32_nb_sector | |||
) |
Returns the capacity of the LUN.
lun | LUN number | |
u32_nb_sector | Pointer to store the last sector address possible on this LUN |
Definition at line 111 of file uhi_msc_mem.c.
uint8_t uhi_msc_mem_read_sector_size | ( | uint8_t | lun | ) |
Returns the sector size of the LUN.
lun | LUN number |
Definition at line 134 of file uhi_msc_mem.c.
bool uhi_msc_mem_removal | ( | void | ) |
Checks if the device is removed.
Definition at line 168 of file uhi_msc_mem.c.
Ctrl_status uhi_msc_mem_test_unit_ready | ( | uint8_t | lun | ) |
Checks and update the status of the LUN.
lun | LUN number |
Definition at line 92 of file uhi_msc_mem.c.
bool uhi_msc_mem_wr_protect | ( | uint8_t | lun | ) |
Checks if the LUN is write protected.
lun | LUN number |
Definition at line 149 of file uhi_msc_mem.c.
Ctrl_status uhi_msc_mem_write_10_ram | ( | uint32_t | addr, | |
const void * | ram | |||
) |
Writes 512 bytes to the current LUN.
The LUN is selected by uhi_msc_mem_test_unit_ready() or uhi_msc_mem_read_capacity() function.
addr | Disk address (unit 512B) | |
ram | Pointer on the data |
Definition at line 203 of file uhi_msc_mem.c.