openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
hotswap.c File Reference

Hotswap sensors implementation. More...

#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "port.h"
#include "sdr.h"
#include "hotswap.h"
#include "task_priorities.h"
#include "ipmi.h"
#include "led.h"
#include "board_led.h"
#include "fru.h"
#include "utils.h"
#include "uart_debug.h"
#include "payload.h"
Include dependency graph for hotswap.c:

Functions

void hotswap_init (void)
 Initializes hotswap sensor informatiosn on SDR and creates vTaskHotSwap.
 
void vTaskHotSwap (void *Parameters)
 Periodically reads the Hotswap sensor state and checks if its state has changed.
 
ipmb_error hotswap_send_event (sensor_t *sensor, uint8_t evt)
 Send a hotswap event via IPMB.
 
void hotswap_clear_mask_bit (uint8_t fru, uint8_t mask)
 Clears the corresponding status bit in the Hotswap SDR readout value.
 
void hotswap_set_mask_bit (uint8_t fru, uint8_t mask)
 Sets the corresponding status bit in the Hotswap SDR readout value.
 

Variables

TaskHandle_t vTaskHotSwap_Handle
 Hotswap Task handle.
 
SDR_type_02h_thotswap_amc_pSDR
 
sensor_thotswap_amc_sensor
 
SDR_type_02h_thotswap_rtm_pSDR
 
sensor_thotswap_rtm_sensor
 

Detailed Description

Hotswap sensors implementation.

Author
Henrique Silva henri.nosp@m.que..nosp@m.silva.nosp@m.@lnl.nosp@m.s.br, LNLS

Function Documentation

◆ hotswap_clear_mask_bit()

void hotswap_clear_mask_bit ( uint8_t fru,
uint8_t mask )

Clears the corresponding status bit in the Hotswap SDR readout value.

Parameters
fruFRU ID that identifies the owner of the sensor
maskBit position to clear
Returns
None

◆ hotswap_init()

void hotswap_init ( void )

Initializes hotswap sensor informatiosn on SDR and creates vTaskHotSwap.

Returns
None

◆ hotswap_send_event()

ipmb_error hotswap_send_event ( sensor_t * sensor,
uint8_t evt )

Send a hotswap event via IPMB.

Parameters
sensorPointer to current Hotswap sensor structure
evtEvent to be sent
Returns
IPMB layer error
See also
ipmb.c

◆ hotswap_set_mask_bit()

void hotswap_set_mask_bit ( uint8_t fru,
uint8_t mask )

Sets the corresponding status bit in the Hotswap SDR readout value.

Parameters
fruFRU ID that identifies the owner of the sensor
maskBit position to set
Returns
None

◆ vTaskHotSwap()

void vTaskHotSwap ( void * Parameters)

Periodically reads the Hotswap sensor state and checks if its state has changed.

Parameters
ParametersPointer to parameter list passed to task upon initialization (not used here)

Variable Documentation

◆ hotswap_amc_pSDR

SDR_type_02h_t* hotswap_amc_pSDR

◆ hotswap_amc_sensor

sensor_t* hotswap_amc_sensor

◆ hotswap_rtm_pSDR

SDR_type_02h_t* hotswap_rtm_pSDR

◆ hotswap_rtm_sensor

sensor_t* hotswap_rtm_sensor

◆ vTaskHotSwap_Handle

TaskHandle_t vTaskHotSwap_Handle

Hotswap Task handle.