Macros | |
#define | STORAGE_LUN_NBR 1 |
#define | STORAGE_BLK_NBR 0x10000 |
#define | STORAGE_BLK_SIZ 0x200 |
Functions | |
int8_t | STORAGE_Init (uint8_t lun) |
Initializes the storage unit (medium) More... | |
int8_t | STORAGE_GetCapacity (uint8_t lun, uint32_t *block_num, uint16_t *block_size) |
Returns the medium capacity. More... | |
int8_t | STORAGE_IsReady (uint8_t lun) |
Checks whether the medium is ready. More... | |
int8_t | STORAGE_IsWriteProtected (uint8_t lun) |
Checks whether the medium is write protected. More... | |
int8_t | STORAGE_Read (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len) |
Reads data from the medium. More... | |
int8_t | STORAGE_Write (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len) |
Writes data into the medium. More... | |
int8_t | STORAGE_GetMaxLun (void) |
Returns the Max Supported LUNs. More... | |
Variables | |
int8_t | STORAGE_Inquirydata [] |
USBD_StorageTypeDef | USBD_DISK_fops |
#define STORAGE_BLK_NBR 0x10000 |
#define STORAGE_BLK_SIZ 0x200 |
#define STORAGE_LUN_NBR 1 |
int8_t STORAGE_GetCapacity | ( | uint8_t | lun, |
uint32_t * | block_num, | ||
uint16_t * | block_size | ||
) |
Returns the medium capacity.
lun | Logical unit number |
block_num | Number of total block number |
block_size | Block size |
Status | (0: OK / -1: Error) |
int8_t STORAGE_GetMaxLun | ( | void | ) |
Returns the Max Supported LUNs.
None |
Lun(s) | number |
int8_t STORAGE_Init | ( | uint8_t | lun | ) |
Initializes the storage unit (medium)
lun | Logical unit number |
Status | (0 : OK / -1 : Error) |
int8_t STORAGE_IsReady | ( | uint8_t | lun | ) |
Checks whether the medium is ready.
lun | Logical unit number |
Status | (0: OK / -1: Error) |
int8_t STORAGE_IsWriteProtected | ( | uint8_t | lun | ) |
Checks whether the medium is write protected.
lun | Logical unit number |
Status | (0: write enabled / -1: otherwise) |
int8_t STORAGE_Read | ( | uint8_t | lun, |
uint8_t * | buf, | ||
uint32_t | blk_addr, | ||
uint16_t | blk_len | ||
) |
Reads data from the medium.
lun | Logical unit number |
blk_addr | Logical block address |
blk_len | Blocks number |
Status | (0: OK / -1: Error) |
int8_t STORAGE_Write | ( | uint8_t | lun, |
uint8_t * | buf, | ||
uint32_t | blk_addr, | ||
uint16_t | blk_len | ||
) |
Writes data into the medium.
lun | Logical unit number |
blk_addr | Logical block address |
blk_len | Blocks number |
Status | (0 : OK / -1 : Error) |
int8_t STORAGE_Inquirydata[] |
USBD_StorageTypeDef USBD_DISK_fops |