SmoothDriving/FatFs/mmc_avr.c
void disk_timerproc (void)
{
	BYTE n, s;


	n = Timer1;				/* 100Hz decrement timer */
	if (n) Timer1 = --n;
	n = Timer2;
	if (n) Timer2 = --n;

	s = Stat;
	// Commented out lines because SD card reader does not have write protect or card detected signals
//	if (MMC_WP)				/* Write protected */
//		s |= STA_PROTECT;
//	else					/* Write enabled */
		s &= ~STA_PROTECT; 
		// MAYBE
		//s |= STA_PROTECT;
	//if (MMC_CD)				/* Card inserted */
	//	s &= ~STA_NODISK;
	//else					/* Socket empty */
	//	s |= (STA_NODISK | STA_NOINIT);

	Stat = s;				/* Update MMC status */
}
/*-----------------------------------------------------------------------*/
/* Device Timer Interrupt Procedure                                      */
/*-----------------------------------------------------------------------*/
/* This function must be called in period of 10ms                        */
Device Timer Interrupt Procedure
This function must be called in period of 10ms
Device Timer Interrupt Procedure This function must be called in period of 10ms
void disk_timerproc (void)
{
	BYTE n, s;
	n = Timer1;				
	if (n) Timer1 = --n;
	n = Timer2;
	if (n) Timer2 = --n;
	s = Stat;
		s &= ~STA_PROTECT; 
	Stat = s;				
}
void disk_timerproc ( void ) { BYTE n , s ; n = Timer1 ; if ( n ) Timer1 = -- n ; n = Timer2 ; if ( n ) Timer2 = -- n ; s = Stat ; s &= ~ STA_PROTECT ; Stat = s ; }
Device Timer Interrupt Procedure
This function must be called in period of 10ms
Device Timer Interrupt Procedure This function must be called in period of 10ms
/* 100Hz decrement timer */ // Commented out lines because SD card reader does not have write protect or card detected signals
 //	if (MMC_WP)				/* Write protected */
 //		s |= STA_PROTECT;
 //	else					/* Write enabled */
 // MAYBE
 //s |= STA_PROTECT;
 //if (MMC_CD)				/* Card inserted */
 //	s &= ~STA_NODISK;
 //else					/* Socket empty */
 //	s |= (STA_NODISK | STA_NOINIT);
 /* Update MMC status */