Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

Section
Public Prototypes
1.4.1.5.1.3 USBMSDInit Function
File
usb_device_msd.h
Syntax
void USBMSDInit();
Description
This is function USBMSDInit.
1.4.1.5.2 Data Types and Constants
Module
MSD Function Driver
Structures
Name Description
LUN_FUNCTIONS LUN_FUNCTIONS is a structure of function pointers that tells the stack
where to find each of the physical layer functions it is looking for. This
structure needs to be defined for any project for PIC24F or PIC32.
Description
1.4.1.5.2.1 LUN_FUNCTIONS Structure
LUN_FUNCTIONS is a structure of function pointers that tells the stack where to find each of the physical layer functions it is
looking for. This structure needs to be defined for any project for PIC24F or PIC32.
File
usb_device_msd.h
Syntax
typedef struct {
FILEIO_MEDIA_INFORMATION* (* MediaInitialize)(void * config);
uint32_t (* ReadCapacity)(void * config);
uint16_t (* ReadSectorSize)(void * config);
bool (* MediaDetect)(void * config);
uint8_t (* SectorRead)(void * config, uint32_t sector_addr, uint8_t* buffer);
uint8_t (* WriteProtectState)(void * config);
uint8_t (* SectorWrite)(void * config, uint32_t sector_addr, uint8_t* buffer, uint8_t
allowWriteToZero);
void * mediaParameters;
} LUN_FUNCTIONS;
Members
Members Description
FILEIO_MEDIA_INFORMATION* (* MediaInitialize)(void *
config);
Function pointer to the MediaInitialize() function of the
physical media being used.
uint32_t (* ReadCapacity)(void * config); Function pointer to the ReadCapacity() function of the
physical media being used.
uint16_t (* ReadSectorSize)(void * config); Function pointer to the ReadSectorSize() function of the
physical media being used.
1.4 Library Interface MLA - USB Library Help Device/Peripheral
94

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh