Error Handling

Overview

This group defines a set of functions for error handling.

+ Collaboration diagram for Error Handling:

Functions

long NemGetLastDevErr (TNemesys *Nemesys, int32_t *pLastDevErr)
 Read last device error from error register. More...
 

Function Documentation

long NemGetLastDevErr ( TNemesys Nemesys,
int32_t *  pLastDevErr 
)

Read last device error from error register.

If device is in fault state, then a device error occured. The last device error is always stored in the device error register. This function reads the last device error from the device error register. The function NemClearFault() will clear the error register so the application should read the last device error before it clears the fault state.

Parameters
[in]NemesysDevice to query
[out]pLastDevErrStores last device error code
Returns
Error code - ERR_NOERR indicates success
See also
NemIsInFaultState(), NemClearFault()
1239 {
1240  return CsiDevReadObject(&Nemesys->Device, NEM_OD_H1003_ERROR_HISTORY,
1241  H1003_SUB_01_ERR_IDX_1, (uint32_t*)pLastDevErr);
1242 }
long CsiDevReadObject(struct CsiDev *pDev, uint16_t ObjDicIdx, uint8_t ObjDicSub, uint32_t *pRxDWord)
This function reads up to 4 bytes of data from device object dictionary.
Definition: csi_dev.c:157
struct CsiDev Device
CSI device object.
Definition: nem_rs232_api.h:41

+ Here is the call graph for this function: