#ifndef MPS_LINK_NODE_MACROS_H #define MPS_LINK_NODE_MACROS_H #define LOCAL static #ifndef OK #define OK (0) #endif #ifndef ERROR #define ERROR (-1) #endif #ifndef NULL #define NULL ('\0') #endif /* MPS Link Node Configuration Modes */ #define MPS_PIC_MODE (0x04) #define MPS_MPG_CONTROL_MODE (0x03) #define MPS_BYKIK_MODE (0x02) #define MPS_BLM_MODE (0x01) #define MPS_MITIGATION_CONTROL_MODE (0x00) /* MPS Link Node Threshold Types */ #define MPS_THLD_LOW (0) #define MPS_THLD_HIGH (1) /* MPS Link Node Bytes */ #define MPS_BYTES_LOW (0) #define MPS_BYTES_HIGH (1) #define MPS_FIFO_SIZE (1000) #define MPS_DEBOUNCE_ENUMS (8) /* MPS Link Node QADC Fault Types */ #define MPS_QADC_FAULT_TYPE_CHAN (0) #define MPS_QADC_FAULT_TYPE_SUM0 (1) #define MPS_QADC_FAULT_TYPE_SUM1 (2) #define MPS_QADC_FAULT_TYPE_CHAN_LATCHED (3) #define MPS_QADC_FAULT_TYPE_SUM0_LATCHED (4) #define MPS_QADC_FAULT_TYPE_SUM1_LATCHED (5) #define MPS_QADC_THRESHOLD_RANGE (67108863) /* 26 bits */ #define MPS_QADC_THRESHOLD_LOWER_LIMIT ((-1)*(MPS_QADC_THRESHOLD_RANGE+1)/2) #define MPS_QADC_THRESHOLD_UPPER_LIMIT ((MPS_QADC_THRESHOLD_RANGE-1)/2) #endif