Aurora User Manual Rev A6
www.diamondsystems.com
Page
34
unsigned long ECU_Read_686C_RAM_BYTE( ULONG ECUMemAddr )
{
ULONG uDATA1,uDATA2,ECRamAddrH,ECRamAddrL;
ECRamAddrL=ECUMemAddr%256; ECRamAddrH=ECUMemAddr/256;
//
uDATA1=Process_686C_Command_Write(0x000000A3, ECRamAddrH );
if ( uDATA1==0xFFFFFFFF ) { return 0xFFFFFFFF; }
//
uDATA1=Process_686C_Command_Write(0x000000A2, ECRamAddrL );
if ( uDATA1==0xFFFFFFFF ) { return 0xFFFFFFFF; }
//
uDATA1=Process_686C_Command_Read( 0x000000A4 );
if ( uDATA1 > 0x000000FF ) { return 0xFFFFFFFF; }
uDATA2=Process_686C_Command_Read( 0x000000A4 );
if ( uDATA2 > 0x000000FF ) { return 0xFFFFFFFF; }
if (uDATA1==uDATA2) return uDATA1;
else return 0xFFFFFFFF;
}
//----------------------------------------------------------------------------
unsigned long ECU_Write_686C_RAM_BYTE( ULONG ECUMemAddr,ULONG ECUMemData )
{
ULONG uDATA, RD_DATA, ECRamAddrH, ECRamAddrL;
ECRamAddrL=ECUMemAddr%256; ECRamAddrH=ECUMemAddr/256;
//
uDATA=Process_686C_Command_Write(0x000000A3, ECRamAddrH );
if ( uDATA==0xFFFFFFFF ) { return 0xFFFFFFFF;}
//
uDATA=Process_686C_Command_Write(0x000000A2, ECRamAddrL );
if ( uDATA==0xFFFFFFFF ) { return 0xFFFFFFFF;}
//
uDATA=Process_686C_Command_Write(0x000000A5, ECUMemData );
if ( uDATA==0xFFFFFFFF ) { return 0xFFFFFFFF;}
//
return 0x00000000;
}
//----------------------------------------------------------------------------