if (Media.PhyBlock==NO_ASSIGN)
{
Media.PhyBlock=WriteBlock;
- return(SUCCESS);
+ return(SMSUCCESS);
}
Clr_D_Bit(Assign[Media.Zone],Media.PhyBlock);
Media.PhyBlock=WriteBlock;
- return(SUCCESS);
+ return(SMSUCCESS);
}
/*
//----- Media_D_WriteSector() ------------------------------------------
// default: *c= 0; *h= 0; *s= 0; ErrCode = ERR_NoSmartMedia; return(ERROR);
// }
//
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
////Power Control & Media Exist Check Subroutine
// MediaChange = ERROR;
// //usleep(56*1024);
// if ((!Check_D_CntPower())&&(!MediaChange)) // ¦³ power & Media ¨S³Q change, «h return success
-// return(SUCCESS);
+// return(SMSUCCESS);
// //usleep(56*1024);
//
// if (Check_D_CardExist()) // Check if card is not exist, return err
// //usleep(56*1024);
// Ssfdc_D_Reset(fdoExt);
// //usleep(56*1024);
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
////-----Check_D_MediaExist() --------------------------------------------
// if (!Check_D_CardExist())
// {
// if (!MediaChange)
-// return(SUCCESS);
+// return(SMSUCCESS);
//
// ErrCode = ERR_ChangedMedia;
// return(ERROR);
// return(ERROR);
// }
//
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
*/
//SmartMedia Physical Format Test Subroutine
//usleep(56*1024);
if (!MediaChange)
- return(SUCCESS);
+ return(SMSUCCESS);
MediaChange = ERROR;
SectCopyMode = COMPLETED;
}
- MediaChange = SUCCESS;
- return(SUCCESS);
+ MediaChange = SMSUCCESS;
+ return(SMSUCCESS);
}
/*
////----- Check_D_BlockIsFull() ----------------------------------
// return(ERROR);
// }
//
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
*/
//SmartMedia Physical Address Control Subroutine
Clr_D_RedundantData(Redundant);
Set_D_LogBlockAddr(Redundant);
Media.PhyBlock = Log2Phy[Media.Zone][Media.LogBlock];
- return(SUCCESS);
+ return(SMSUCCESS);
}
ErrCode = ERR_OutOfLBA;
//ADDRESS_T bb = (ADDRESS_T) &Media;
if (++Media.Sector<Ssfdc.MaxSectors)
- return(SUCCESS);
+ return(SMSUCCESS);
if (Log2Phy[Media.Zone]==NULL)
{
Clr_D_RedundantData(Redundant);
Set_D_LogBlockAddr(Redundant);
Media.PhyBlock=Log2Phy[Media.Zone][Media.LogBlock];
- return(SUCCESS);
+ return(SMSUCCESS);
}
Media.LogBlock=0;
Clr_D_RedundantData(Redundant);
Set_D_LogBlockAddr(Redundant);
Media.PhyBlock=Log2Phy[Media.Zone][Media.LogBlock];
- return(SUCCESS);
+ return(SMSUCCESS);
}
Media.Zone=0;
ADDRESS_T bb = (ADDRESS_T) &Media;
if (!Media.Sector)
- return(SUCCESS);
+ return(SMSUCCESS);
return(ERROR);
}
if (Media.Sector<(Ssfdc.MaxSectors-1))
return(ERROR);
- return(SUCCESS);
+ return(SMSUCCESS);
}
*/
//SmartMedia Read/Write Subroutine with Retry
DWORD err, retry;
if (!Read_D_PhyOneSect(us, count, buf))
- return(SUCCESS);
+ return(SMSUCCESS);
if (ErrCode==ERR_HwError)
return(ERROR);
if (ErrCode==ERR_DataStatus)
if (Ssfdc.Attribute &MWP)
{
if (ErrCode==ERR_CorReadErr)
- return(SUCCESS);
+ return(SMSUCCESS);
return(ERROR);
}
ErrCode = err;
if (ErrCode==ERR_CorReadErr)
- return(SUCCESS);
+ return(SMSUCCESS);
return(ERROR);
}
MediaChange = ERROR;
#else
- if (ErrCode==ERR_CorReadErr) return(SUCCESS);
+ if (ErrCode==ERR_CorReadErr) return(SMSUCCESS);
#endif
return(ERROR);
ADDRESS_T bb = (ADDRESS_T) &Media;
if (!Write_D_PhyOneSect(fdoExt, count, buf))
- return(SUCCESS);
+ return(SMSUCCESS);
if (ErrCode==ERR_HwError)
return(ERROR);
}
if (!Write_D_PhyOneSect(fdoExt, count, buf))
- return(SUCCESS);
+ return(SMSUCCESS);
if (ErrCode==ERR_HwError)
return(ERROR);
}
for(retry=0; retry<2; retry++)
{
if (!Copy_D_BlockHead(fdoExt))
- return(SUCCESS);
+ return(SMSUCCESS);
if (ErrCode==ERR_HwError)
return(ERROR);
}
DWORD retry;
if (!Copy_D_BlockTail(fdoExt))
- return(SUCCESS);
+ return(SMSUCCESS);
if (ErrCode==ERR_HwError)
return(ERROR);
}
if (!Copy_D_BlockTail(fdoExt))
- return(SUCCESS);
+ return(SMSUCCESS);
if (ErrCode==ERR_HwError)
return(ERROR);
}
// ADDRESS_T bb = (ADDRESS_T) &Media;
//
// if (Media.PhyBlock==NO_ASSIGN)
-// return(SUCCESS);
+// return(SMSUCCESS);
//
// if (Log2Phy[Media.Zone]==NULL)
// {
//
// Clr_D_Bit(Assign[Media.Zone],Media.PhyBlock);
// Media.PhyBlock=NO_ASSIGN;
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
////SmartMedia Erase Subroutine
// }
//
// }
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
*/
//SmartMedia Physical Sector Data Copy Subroutine
Media.PhyBlock=WriteBlock;
Media.Sector=sect;
- return(SUCCESS);
+ return(SMSUCCESS);
}
/*
//----- Copy_D_BlockHead() ---------------------------------------------
Media.PhyBlock=WriteBlock;
Media.Sector=sect;
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- Copy_D_BlockTail() ---------------------------------------------
Media.PhyBlock=WriteBlock;
Media.Sector=sect;
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- Reassign_D_BlockHead() -----------------------------------------
ReadBlock=block;
Media.Sector=sect;
Media.PhyBlock=WriteBlock;
- return(SUCCESS);
+ return(SMSUCCESS);
}
*/
//SmartMedia Physical Block Assign/Release Subroutine
Media.PhyBlock=WriteBlock;
SectCopyMode=REQ_ERASE;
//ErrXDCode = NO_ERROR;
- return(SUCCESS);
+ return(SMSUCCESS);
}
}
Media.PhyBlock=WriteBlock;
SectCopyMode=REQ_ERASE;
//ErrXDCode = NO_ERROR;
- return(SUCCESS);
+ return(SMSUCCESS);
}
}
SectCopyMode=COMPLETED;
if (mode==COMPLETED)
- return(SUCCESS);
+ return(SMSUCCESS);
Log2Phy[Media.Zone][Media.LogBlock]=WriteBlock;
Media.PhyBlock=ReadBlock;
if (Media.PhyBlock==NO_ASSIGN)
{
Media.PhyBlock=WriteBlock;
- return(SUCCESS);
+ return(SMSUCCESS);
}
if (mode==REQ_ERASE)
return(ERROR);
Media.PhyBlock=WriteBlock;
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- Release_D_WriteBlock() -----------------------------------------
return(ERROR);
Media.PhyBlock=ReadBlock;
- return(SUCCESS);
+ return(SMSUCCESS);
}
//SmartMedia Physical Sector Data Copy Subroutine
if (Check_D_DataStatus(WorkRedund))
{ err=ERROR; break; }
if (!Check_D_ReadError(WorkRedund))
- { err=SUCCESS; break; }
+ { err=SMSUCCESS; break; }
if (!Check_D_Correct(WorkBuf,WorkRedund))
- { err=SUCCESS; break; }
+ { err=SMSUCCESS; break; }
err=ERROR;
SectCopyMode=REQ_FAIL;
}
else
{
- err=SUCCESS;
+ err=SMSUCCESS;
for(i=0; i<SECTSIZE; i++)
WorkBuf[i]=DUMMY_DATA;
Clr_D_RedundantData(WorkRedund);
{ ErrCode = ERR_WriteFault; return(ERROR); }
Media.PhyBlock=ReadBlock;
- return(SUCCESS);
+ return(SMSUCCESS);
}
//SmartMedia Physical Sector Read/Write/Erase Subroutine
{
for(i=0; i<SECTSIZE; i++)
*buf++=DUMMY_DATA;
- return(SUCCESS);
+ return(SMSUCCESS);
}
for(retry=0; retry<2; retry++)
{ ErrCode = ERR_DataStatus; return(ERROR); }
if (!Check_D_ReadError(Redundant))
- return(SUCCESS);
+ return(SMSUCCESS);
if (!Check_D_Correct(buf,Redundant))
{ ErrCode = ERR_CorReadErr; return(ERROR); }
if (Ssfdc_D_CheckStatus())
{ ErrCode = ERR_WriteFault; return(ERROR); }
- return(SUCCESS);
+ return(SMSUCCESS);
}
*/
//----- Erase_D_PhyOneBlock() ------------------------------------------
if (Ssfdc_D_CheckStatus())
{ ErrCode = ERR_WriteFault; return(ERROR); }
- return(SUCCESS);
+ return(SMSUCCESS);
}
//SmartMedia Physical Format Check Local Subroutine
// }
// }
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- Search_D_CIS() -------------------------------------------------
CisArea.PhyBlock=Media.PhyBlock;
CisArea.Sector=Media.Sector;
Ssfdc_D_Reset(us);
- return(SUCCESS);
+ return(SMSUCCESS);
}
Media.Sector++;
} // End for (Media.Zone<MAX_ZONENUM)
Ssfdc_D_Reset(us);
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- MarkFail_D_PhyOneBlock() ---------------------------------------
Ssfdc_D_Reset(us);
Media.Sector=sect;
- return(SUCCESS);
+ return(SMSUCCESS);
}
/*
//
//
// Ssfdc_D_Reset(fdoExt);
//
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
////----- Media_D_GetMediaInfo() ---------------------------------------
if (*redundant++!=0xFF)
return(ERROR);
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- Check_D_FailBlock() --------------------------------------------
redundant+=REDT_BLOCK;
if (*redundant==0xFF)
- return(SUCCESS);
+ return(SMSUCCESS);
if (!*redundant)
return(ERROR);
if (hweight8(*redundant)<7)
return(ERROR);
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- Check_D_DataStatus() -------------------------------------------
redundant+=REDT_DATA;
if (*redundant==0xFF)
- return(SUCCESS);
+ return(SMSUCCESS);
if (!*redundant)
{
ErrXDCode = ERR_DataStatus;
if (hweight8(*redundant)<5)
return(ERROR);
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- Load_D_LogBlockAddr() ------------------------------------------
if (addr1==addr2)
if ((addr1 &0xF000)==0x1000)
- { Media.LogBlock=(addr1 &0x0FFF)/2; return(SUCCESS); }
+ { Media.LogBlock=(addr1 &0x0FFF)/2; return(SMSUCCESS); }
if (hweight16((WORD)(addr1^addr2))!=0x01) return(ERROR);
if ((addr1 &0xF000)==0x1000)
if (!(hweight16(addr1) &0x01))
- { Media.LogBlock=(addr1 &0x0FFF)/2; return(SUCCESS); }
+ { Media.LogBlock=(addr1 &0x0FFF)/2; return(SMSUCCESS); }
if ((addr2 &0xF000)==0x1000)
if (!(hweight16(addr2) &0x01))
- { Media.LogBlock=(addr2 &0x0FFF)/2; return(SUCCESS); }
+ { Media.LogBlock=(addr2 &0x0FFF)/2; return(SMSUCCESS); }
return(ERROR);
}
}
Media.Zone=zone; Media.PhyBlock=block; Media.Sector=sector;
- return(SUCCESS);
+ return(SMSUCCESS);
}
/*
////----- Ssfdc_D_WriteRedtMode() ----------------------------------------
//
// if (!_Hw_D_ChkCardIn())
// return(ERROR);
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
////----- Ssfdc_D_ReadSect_PIO() ---------------------------------------------
//
// _Calc_D_ECCdata(buf);
// _Set_D_SsfdcRdStandby();
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
// 6250 CMD 3
// ENE_Print("Error\n");
// }
- return(SUCCESS);
+ return(SMSUCCESS);
}
*/
//----- Ssfdc_D_CopyBlock() --------------------------------------------
// ENE_Print("Error\n");
// }
- return(SUCCESS);
+ return(SMSUCCESS);
}
//
////----- Ssfdc_D_WriteSect_DMA() --------------------------------------------
// if (!_Hw_D_ChkCardIn())
// return(ERROR);
//
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
////----- Ssfdc_D_WriteSect_PIO() --------------------------------------------
//
// _Set_D_SsfdcWrStandby();
// _Set_D_SsfdcRdStandby();
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
*/
//----- Ssfdc_D_WriteSectForCopy() -------------------------------------
int Ssfdc_D_CheckStatus(void)
{
// Driver ¤£°µ
- return(SUCCESS);
+ return(SMSUCCESS);
//_Set_D_SsfdcRdCmd(RDSTATUS);
//
//if (_Check_D_SsfdcStatus())
//{ _Set_D_SsfdcRdStandby(); return(ERROR); }
//
//_Set_D_SsfdcRdStandby();
- //return(SUCCESS);
+ //return(SMSUCCESS);
}
/*
////NAND Memory (SmartMedia) Control Subroutine for Read Data
//
// do {
// if (!_Hw_D_ChkBusy())
-// return(SUCCESS);
+// return(SMSUCCESS);
// EDelay(100);
// count++;
// } while (count<=time);
// if (_Hw_D_InData() & WR_FAIL)
// return(ERROR);
//
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
//// For 712
return(ERROR);
}
- return(SUCCESS);
+ return(SMSUCCESS);
}
//----- _Check_D_DevCode() ---------------------------------------------
// if (_Hw_D_ChkPower())
// {
// _Hw_D_EnableOB(); // Set SM_REG_CTRL_5 Reg. to 0x83
-// return(SUCCESS);
+// return(SMSUCCESS);
// }
//
// _Hw_D_SetVccOff();
//int Check_D_CntPower(void)
//{
// if (_Hw_D_ChkPower())
-// return(SUCCESS); // Power On
+// return(SMSUCCESS); // Power On
//
// return(ERROR); // Power Off
//}
//
// if (!_Hw_D_ChkStatus()) // Not Status Change
// if (_Hw_D_ChkCardIn())
-// return(SUCCESS); // Card exist in Slot
+// return(SMSUCCESS); // Card exist in Slot
//
// for(i=0,j=0,k=0; i<16; i++) {
// if (_Hw_D_ChkCardIn()) // Status Change
// }
//
// if (j>3)
-// return(SUCCESS); // Card exist in Slot
+// return(SMSUCCESS); // Card exist in Slot
// if (k>3)
// return(ERROR); // NO Card exist in Slot
//
// if (_Hw_D_ChkStatus())
// return(ERROR); // Status Change
//
-// return(SUCCESS); // Not Status Change
+// return(SMSUCCESS); // Not Status Change
//}
//
////----- Check_D_SsfdcWP() ----------------------------------------------
//int Check_D_SsfdcWP(void)
-//{ // ERROR: WP, SUCCESS: Not WP
+//{ // ERROR: WP, SMSUCCESS: Not WP
// char i;
//
// for(i=0; i<8; i++) {
// _Wait_D_Timer(TIME_WPCHK);
// }
//
-// return(SUCCESS);
+// return(SMSUCCESS);
//}
//
*/
//----- Check_D_ReadError() ----------------------------------------------
int Check_D_ReadError(BYTE *redundant)
{
- return SUCCESS;
+ return SMSUCCESS;
}
//----- Check_D_Correct() ----------------------------------------------
int Check_D_Correct(BYTE *buf,BYTE *redundant)
{
- return SUCCESS;
+ return SMSUCCESS;
}
//----- Check_D_CISdata() ----------------------------------------------
int cis_len = sizeof(cis);
if (!IsSSFDCCompliance && !IsXDCompliance)
- return SUCCESS;
+ return SMSUCCESS;
if (!memcmp(redundant + 0x0D, EccBuf, 3))
return memcmp(buf, cis, cis_len);
if (!NT_SUCCESS(ntStatus))
return(ERROR);
- return(SUCCESS);
+ return(SMSUCCESS);
}*/