APM:Libraries
Functions | Variables
StorageMode.c File Reference
#include "StorageMode.h"
#include "../sd/FatFs/diskio.h"
Include dependency graph for StorageMode.c:

Go to the source code of this file.

Functions

int8_t STORAGE_Init (uint8_t lun)
 
int8_t STORAGE_GetCapacity (uint8_t lun, uint32_t *block_num, uint32_t *block_size)
 
int8_t STORAGE_IsReady (uint8_t lun)
 
int8_t STORAGE_IsWriteProtected (uint8_t lun)
 
int8_t STORAGE_Read (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
 
int8_t STORAGE_Write (uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
 
int8_t STORAGE_GetMaxLun (void)
 

Variables

USB_OTG_CORE_HANDLE USB_OTG_dev
 
const int8_t STORAGE_Inquirydata []
 
const USBD_STORAGE_cb_TypeDef STORAGE_fops
 
const USBD_STORAGE_cb_TypeDef *const USBD_STORAGE_fops = &STORAGE_fops
 

Function Documentation

◆ STORAGE_GetCapacity()

int8_t STORAGE_GetCapacity ( uint8_t  lun,
uint32_t *  block_num,
uint32_t *  block_size 
)

Definition at line 34 of file StorageMode.c.

◆ STORAGE_GetMaxLun()

int8_t STORAGE_GetMaxLun ( void  )
inline

Definition at line 71 of file StorageMode.c.

Here is the call graph for this function:

◆ STORAGE_Init()

int8_t STORAGE_Init ( uint8_t  lun)

Definition at line 28 of file StorageMode.c.

◆ STORAGE_IsReady()

int8_t STORAGE_IsReady ( uint8_t  lun)

Definition at line 43 of file StorageMode.c.

Here is the call graph for this function:

◆ STORAGE_IsWriteProtected()

int8_t STORAGE_IsWriteProtected ( uint8_t  lun)

Definition at line 48 of file StorageMode.c.

Here is the call graph for this function:

◆ STORAGE_Read()

int8_t STORAGE_Read ( uint8_t  lun,
uint8_t *  buf,
uint32_t  blk_addr,
uint16_t  blk_len 
)

Definition at line 54 of file StorageMode.c.

Here is the call graph for this function:

◆ STORAGE_Write()

int8_t STORAGE_Write ( uint8_t  lun,
uint8_t *  buf,
uint32_t  blk_addr,
uint16_t  blk_len 
)

Definition at line 63 of file StorageMode.c.

Here is the call graph for this function:

Variable Documentation

◆ STORAGE_fops

const USBD_STORAGE_cb_TypeDef STORAGE_fops
Initial value:
=
{
}
int8_t STORAGE_GetCapacity(uint8_t lun, uint32_t *block_num, uint32_t *block_size)
Definition: StorageMode.c:34
int8_t STORAGE_Init(uint8_t lun)
Definition: StorageMode.c:28
int8_t STORAGE_Write(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
Definition: StorageMode.c:63
int8_t STORAGE_IsReady(uint8_t lun)
Definition: StorageMode.c:43
int8_t STORAGE_Read(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
Definition: StorageMode.c:54
const int8_t STORAGE_Inquirydata[]
Definition: StorageMode.c:17
int8_t STORAGE_GetMaxLun(void)
Definition: StorageMode.c:71
int8_t STORAGE_IsWriteProtected(uint8_t lun)
Definition: StorageMode.c:48

Definition at line 93 of file StorageMode.c.

◆ STORAGE_Inquirydata

const int8_t STORAGE_Inquirydata[]
Initial value:
=
{
0x00, 0x80, 0x02, 0x02,
0x00, 0x00, 0x00,
'R', 'E', 'V', 'O', ' ', '@', 'N', 'G',
'S', 'D', ' ', 'C', 'a', 'r', 'd', ' ',
'R', 'e', 'a', 'd', 'e', 'r', ' ', ' ',
'1', '.', '0' ,'0',
}
#define USBD_STD_INQUIRY_LENGTH
Definition: usbd_msc_mem.h:48

Definition at line 17 of file StorageMode.c.

◆ USB_OTG_dev

USB_OTG_CORE_HANDLE USB_OTG_dev