21 uint8_t etCount[ERR_TRACK_BITS];
23 static
int bitmaskToPos(
int mask) {
29 case 0x1 :
return pos + 0;
30 case 0x2 :
return pos + 1;
31 case 0x3 :
return pos + 2;
32 case 0x4 :
return pos + 3;
44 void etCheckFailure(
int sysmask)
46 int system = bitmaskToPos(sysmask);
47 assert(system >= 0 && system < (1 << ERR_TRACK_BITS));
53 if (etCount[system] >= ERR_THRESHOLD)
55 logError(
"Applying disable mask %02x, too many errors for device", sysmask);
bool errHas()
Returns whether there is an error pending.
uint8_t sys_fail
Failure bitmask, same bits as SYS_DISABLE.
sys_t sys
Provides access to all process variables of subsystem System.
uint8_t sys_disable
Disable parts of the system.
void errClear()
Clears the current error.
#define logError(MSG,...)
Format a log message with fatal level.
#define LOG_DEF(NAME,...)
Define a logger for a module.
Implements a generic logger facility.