Add project [bootloader_zevero_sd_m644p_make]
This commit is contained in:
		
							
								
								
									
										73
									
								
								bootloader_zevero_sd_m644p_make/pff/src/diskio.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								bootloader_zevero_sd_m644p_make/pff/src/diskio.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,73 @@
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
/* Low level disk I/O module skeleton for Petit FatFs (C)ChaN, 2014      */
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
#include "diskio.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
/* Initialize Disk Drive                                                 */
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
DSTATUS disk_initialize (void)
 | 
			
		||||
{
 | 
			
		||||
	DSTATUS stat;
 | 
			
		||||
 | 
			
		||||
	// Put your code here
 | 
			
		||||
 | 
			
		||||
	return stat;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
/* Read Partial Sector                                                   */
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
DRESULT disk_readp (
 | 
			
		||||
	BYTE* buff,		/* Pointer to the destination object */
 | 
			
		||||
	DWORD sector,	/* Sector number (LBA) */
 | 
			
		||||
	UINT offset,	/* Offset in the sector */
 | 
			
		||||
	UINT count		/* Byte count (bit15:destination) */
 | 
			
		||||
)
 | 
			
		||||
{
 | 
			
		||||
	DRESULT res;
 | 
			
		||||
 | 
			
		||||
	// Put your code here
 | 
			
		||||
 | 
			
		||||
	return res;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
/* Write Partial Sector                                                  */
 | 
			
		||||
/*-----------------------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
DRESULT disk_writep (
 | 
			
		||||
	BYTE* buff,		/* Pointer to the data to be written, NULL:Initiate/Finalize write operation */
 | 
			
		||||
	DWORD sc		/* Sector number (LBA) or Number of bytes to send */
 | 
			
		||||
)
 | 
			
		||||
{
 | 
			
		||||
	DRESULT res;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	if (!buff) {
 | 
			
		||||
		if (sc) {
 | 
			
		||||
 | 
			
		||||
			// Initiate write process
 | 
			
		||||
 | 
			
		||||
		} else {
 | 
			
		||||
 | 
			
		||||
			// Finalize write process
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
 | 
			
		||||
		// Send data to the disk
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return res;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user