Vault 7: Projects

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

Remarks
The card expects the address field in the command packet to be a uint8_t address. The sector_addr value is converted to a
uint8_t address by shifting it left nine times (multiplying by 512).
Preconditions
The FILEIO_SD_SectorWrite function pointer must be pointing to this function.
Parameters
Parameters Description
config An SD Drive configuration structure pointer
sectorAddress The address of the sector on the card.
buffer The buffer with the data to write.
allowWriteToZero
true - Writes to the 0 sector (MBR) are allowed
false - Any write to the 0 sector will fail.
Return Values
Return Values Description
true The sector was written successfully.
false The sector could not be written.
Function
bool FILEIO_SD_SectorWrite ( FILEIO_SD_DRIVE_CONFIG * config,
uint32_t sector_addr, uint8_t * buffer, uint8_t allowWriteToZero)
1.7.2.1.10 FILEIO_SD_WriteProtectStateGet Function
Indicates whether the card is write-protected.
File
sd_spi.h
Syntax
bool FILEIO_SD_WriteProtectStateGet(FILEIO_SD_DRIVE_CONFIG * config);
Module
SD (SPI) Driver
Side Effects
None.
Description
The FILEIO_SD_WriteProtectStateGet function will determine if the SD card is write protected by checking the electrical
signal that corresponds to the physical write-protect switch.
Remarks
None
Preconditions
The FILEIO_SD_WriteProtectStateGet function pointer must be pointing to this function.
Parameters
Parameters Description
config An SD Drive configuration structure pointer
1.7 Library Interface MLA - File I/O Library Help Physical Layer
77

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh