1 Star 3 Fork 1

Kono/USBComposite_stm32f1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
usb_mass_mal.h 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
arpruss 提交于 2018-08-17 19:07 . support mass storage above 4gb
#ifndef __USB_MASS_MAL_H
#define __USB_MASS_MAL_H
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define SCSI_BLOCK_SIZE 512
#define USB_MASS_MAX_DRIVES 2
typedef bool (*MassStorageWriter)(const uint8_t *writebuff, uint32_t startSector, uint16_t numSectors);
typedef bool (*MassStorageReader)(uint8_t *readbuff, uint32_t startSector, uint16_t numSectors);
typedef bool (*MassStorageStatuser)(void);
typedef bool (*MassStorageInitializer)(void);
typedef bool (*MassStorageFormatter)(void);
typedef struct {
uint32_t blockCount;
MassStorageReader read;
MassStorageWriter write;
MassStorageStatuser status;
MassStorageInitializer init;
MassStorageFormatter format;
} MassStorageDriveInfo;
extern MassStorageDriveInfo usb_mass_drives[USB_MASS_MAX_DRIVES];
uint16_t usb_mass_mal_init(uint8_t lun);
uint16_t usb_mass_mal_get_status(uint8_t lun);
uint16_t usb_mass_mal_read_memory(uint8_t lun, uint8_t *readbuff, uint32_t startSector, uint16_t numSectors);
uint16_t usb_mass_mal_write_memory(uint8_t lun, uint8_t *writebuff, uint32_t startSector, uint16_t numSectors);
void usb_mass_mal_format(uint8_t lun);
#ifdef __cplusplus
}
#endif
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Kono2019/USBComposite_stm32f1.git
git@gitee.com:Kono2019/USBComposite_stm32f1.git
Kono2019
USBComposite_stm32f1
USBComposite_stm32f1
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385