Ejemplo n.º 1
0
DRESULT disk_write (
	BYTE drv,			/* Physical drive nmuber (0..) */
	const BYTE *buff,	/* Data to be written */
	DWORD sector,		/* Sector address (LBA) */
	BYTE count			/* Number of sectors to write (1..255) */
)
{
    int nSector;

    for(nSector = 0; nSector < count; nSector++)
    {
 		if (!USBHostMSDSCSISectorWrite(sector, (BYTE *)buff,0))
        {
            return RES_NOTRDY;
        }
        sector++;
        buff += 512;
    }
    return RES_OK;
}
Ejemplo n.º 2
0
uint8_t ChipKITUSBMSDHost::SCSISectorWrite(DWORD sectorAddress, uint8_t * dataBuffer, uint8_t allowWriteToZero)
{
    return(USBHostMSDSCSISectorWrite(sectorAddress,dataBuffer, allowWriteToZero));
}