//------------------------------------------------------------------------------ tOplkError drv_readErrorObject(tErrHndIoctl* pReadObject_p) { tErrHndObjects* errorObjects = NULL; if (pReadObject_p == NULL) return kErrorInvalidOperation; errorObjects = errhndkcal_getMemPtr(); pReadObject_p->errVal = *((UINT8*)errorObjects + pReadObject_p->offset); return kErrorOk; }
//------------------------------------------------------------------------------ tOplkError errhndkcal_init(void) { tOplkError ret; ret = errhndkcal_initMemory(); if (ret != kErrorOk) return ret; pErrHndObjects_l = errhndkcal_getMemPtr(); return kErrorOk; }
//------------------------------------------------------------------------------ tOplkError drv_writeErrorObject(tErrHndIoctl* pWriteObject_p) { tErrHndObjects* errorObjects = NULL; if (pWriteObject_p == NULL) return kErrorInvalidOperation; errorObjects = errhndkcal_getMemPtr(); *((UINT32*)((UINT8*)errorObjects + pWriteObject_p->offset)) = pWriteObject_p->errVal; return kErrorOk; }