X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b9b03aadb219d06fbad9d110e508db93e45461af..730624f745648cbd32bec7da64833cb2aadd44ea:/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c index 87edef12b..5b5a2bd90 100644 --- a/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c +++ b/Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c @@ -43,10 +43,11 @@ * the pre-selected data OUT endpoint. This routine reads in OS sized blocks from the endpoint and writes * them to the dataflash in Dataflash page sized blocks. * + * \param MSInterfaceInfo Pointer to a Mass Storage class state structure for the Mass Storage interface being used * \param BlockAddress Data block starting address for the write sequence * \param TotalBlocks Number of blocks of data to write */ -void DataflashManager_WriteBlocks(USB_ClassInfo_MS_t* MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks) +void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks) { uint16_t CurrDFPage = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE); uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE); @@ -142,7 +143,7 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_t* MSInterfaceInfo, const uin BytesInBlockDiv16++; /* Check if the current command is being aborted by the host */ - if (MSInterfaceInfo->IsMassStoreReset) + if (MSInterfaceInfo->State.IsMassStoreReset) return; } @@ -168,10 +169,11 @@ void DataflashManager_WriteBlocks(USB_ClassInfo_MS_t* MSInterfaceInfo, const uin * the pre-selected data IN endpoint. This routine reads in Dataflash page sized blocks from the Dataflash * and writes them in OS sized blocks to the endpoint. * + * \param MSInterfaceInfo Pointer to a Mass Storage class state structure for the Mass Storage interface being used * \param BlockAddress Data block starting address for the read sequence * \param TotalBlocks Number of blocks of data to read */ -void DataflashManager_ReadBlocks(USB_ClassInfo_MS_t* MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks) +void DataflashManager_ReadBlocks(USB_ClassInfo_MS_Device_t* MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks) { uint16_t CurrDFPage = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) / DATAFLASH_PAGE_SIZE); uint16_t CurrDFPageByte = ((BlockAddress * VIRTUAL_MEMORY_BLOCK_SIZE) % DATAFLASH_PAGE_SIZE); @@ -250,7 +252,7 @@ void DataflashManager_ReadBlocks(USB_ClassInfo_MS_t* MSInterfaceInfo, const uint BytesInBlockDiv16++; /* Check if the current command is being aborted by the host */ - if (MSInterfaceInfo->IsMassStoreReset) + if (MSInterfaceInfo->State.IsMassStoreReset) return; }