Beispiel #1
0
/**
 * Check if MemEEPROM is working
 * @return  1 = is working 0 = not working
 */
int memEEPROM_isAlive(void)
{
    //check if working normally

    int indxVar;    //DAT_StateVar indxVar;
    int wvalue,rvalue;

    //indxVar = sta_MemEEPROM_testVal;
    indxVar = 0;
    
    wvalue = 5005;
    rvalue = 0;
    mem_setVar(indxVar, wvalue);
    rvalue = mem_getVar(indxVar);
    if(rvalue!=wvalue){return 0;}

    wvalue = 5006;
    rvalue = 0x00;
    mem_setVar(indxVar, wvalue);
    rvalue = mem_getVar(indxVar);
    if(rvalue!=wvalue){return 0;}

    return 1;
}
Beispiel #2
0
int ppc_set_opMode(void* param){
    MemEEPROM_Vars mem_eeprom_var = mem_ppc_opMode;
    int value = *((int*)param);
    mem_setVar(mem_eeprom_var, value);
    return 1;   //se asume operacion exitosa
}