44#define DEBOUNCE_TIME 250
47#define HOTSWAP_STATE_HANDLE_CLOSED 0x00
48#define HOTSWAP_STATE_HANDLE_OPENED 0x01
49#define HOTSWAP_STATE_QUIESCED 0x02
50#define HOTSWAP_STATE_BP_FAIL 0x03
51#define HOTSWAP_STATE_BP_SDOWN 0x04
52#define HOTSWAP_STATE_URTM_PRSENT 0x05
53#define HOTSWAP_STATE_URTM_ABSENT 0x06
54#define HOTSWAP_STATE_URTM_COMPATIBLE 0x07
55#define HOTSWAP_STATE_URTM_INCOMPATIBLE 0x08
57#define HOTSWAP_MODULE_HANDLE_CLOSED_MASK 0x01
58#define HOTSWAP_MODULE_HANDLE_OPEN_MASK 0x02
59#define HOTSWAP_QUIESCED_MASK 0x04
60#define HOTSWAP_BACKEND_PWR_FAILURE_MASK 0x08
61#define HOTSWAP_BACKEND_PWR_SHUTDOWN_MASK 0x10
62#define HOTSWAP_URTM_PRESENT_MASK 0x20
63#define HOTSWAP_URTM_ABSENT_MASK 0x40
64#define HOTSWAP_URTM_COMPATIBLE_MASK 0x80
fru_data_t fru[FRU_COUNT]
Definition board_fru.c:34
void hotswap_clear_mask_bit(uint8_t fru, uint8_t mask)
Clears the corresponding status bit in the Hotswap SDR readout value.
Definition hotswap.c:207
TaskHandle_t vTaskHotSwap_Handle
Hotswap Task handle.
Definition hotswap.c:50
void vTaskHotSwap(void *Parameters)
Periodically reads the Hotswap sensor state and checks if its state has changed.
Definition hotswap.c:109
@ HOTSWAP_AMC
Definition hotswap.h:67
@ HOTSWAP_RTM
Definition hotswap.h:68
ipmb_error hotswap_send_event(sensor_t *sensor, uint8_t evt)
Send a hotswap event via IPMB.
Definition hotswap.c:202
void hotswap_set_mask_bit(uint8_t fru, uint8_t mask)
Sets the corresponding status bit in the Hotswap SDR readout value.
Definition hotswap.c:216
void hotswap_init(void)
Initializes hotswap sensor informatiosn on SDR and creates vTaskHotSwap.
Definition hotswap.c:74
ipmb_error
IPMB errors enumeration.
Definition ipmb.h:181