OpenBIC
OpenSource Bridge-IC
plat_led.c File Reference
#include <stdio.h>
#include "plat_gpio.h"
#include "plat_modbus.h"
#include "plat_util.h"
#include "plat_led.h"
#include "plat_sensor_table.h"
#include "plat_threshold.h"
#include "plat_status.h"
#include <logging/log.h>
Include dependency graph for plat_led.c:

Macros

#define LED_BLINK_INIT(DEV)
 

Functions

 LOG_MODULE_REGISTER (plat_led)
 
 LED_BLINK_INIT (POWER)
 
 LED_BLINK_INIT (FAULT)
 
 LED_BLINK_INIT (LEAK)
 
 LED_BLINK_INIT (COOLANT)
 
uint8_t get_led_pin (uint8_t idx)
 
struct k_timer * idx_to_led_timer (uint8_t idx)
 
void led_set (uint8_t idx, uint8_t behaviour)
 
void stop_blink_timer (uint8_t idx)
 
void led_ctrl (uint8_t idx, uint8_t ctrl)
 
uint8_t get_led_status (uint8_t idx)
 
bool fault_led_control (void)
 

Variables

uint8_t fault_led_threshold_sensor []
 

Macro Definition Documentation

◆ LED_BLINK_INIT

#define LED_BLINK_INIT (   DEV)
Value:
void LED_blink_Handler_##DEV(struct k_timer *timer) \
{ \
led_set(LED_IDX_E_##DEV, LED_START_BLINK); \
} \
void LED_stop_blink_Handler_##DEV(struct k_timer *timer) \
{ \
led_set(LED_IDX_E_##DEV, LED_TURN_OFF); \
} \
K_TIMER_DEFINE(led_blink_##DEV, LED_blink_Handler_##DEV, LED_stop_blink_Handler_##DEV);
#define LED_START_BLINK
Definition: plat_led.h:21
#define LED_TURN_OFF
Definition: plat_led.h:19

Function Documentation

◆ fault_led_control()

bool fault_led_control ( void  )
Here is the call graph for this function:

◆ get_led_pin()

uint8_t get_led_pin ( uint8_t  idx)

◆ get_led_status()

uint8_t get_led_status ( uint8_t  idx)

◆ idx_to_led_timer()

struct k_timer * idx_to_led_timer ( uint8_t  idx)

◆ LED_BLINK_INIT() [1/4]

LED_BLINK_INIT ( COOLANT  )

◆ LED_BLINK_INIT() [2/4]

LED_BLINK_INIT ( FAULT  )

◆ LED_BLINK_INIT() [3/4]

LED_BLINK_INIT ( LEAK  )

◆ LED_BLINK_INIT() [4/4]

LED_BLINK_INIT ( POWER  )

◆ led_ctrl()

void led_ctrl ( uint8_t  idx,
uint8_t  ctrl 
)

◆ led_set()

void led_set ( uint8_t  idx,
uint8_t  behaviour 
)
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_led  )

◆ stop_blink_timer()

void stop_blink_timer ( uint8_t  idx)
Here is the call graph for this function:

Variable Documentation

◆ fault_led_threshold_sensor

uint8_t fault_led_threshold_sensor[]
Initial value:
= {
}
#define SENSOR_NUM_PB_1_PUMP_TACH_RPM
Definition: plat_sensor_table.h:162
#define SENSOR_NUM_MB_FAN1_TACH_RPM
Definition: plat_sensor_table.h:171
#define SENSOR_NUM_BPB_RPU_COOLANT_FLOW_RATE_LPM
Definition: plat_sensor_table.h:181
#define SENSOR_NUM_FB_10_FAN_TACH_RPM
Definition: plat_sensor_table.h:157
#define SENSOR_NUM_PB_3_PUMP_TACH_RPM
Definition: plat_sensor_table.h:168
#define SENSOR_NUM_FB_9_FAN_TACH_RPM
Definition: plat_sensor_table.h:156
#define SENSOR_NUM_BPB_RPU_COOLANT_OUTLET_P_KPA
Definition: plat_sensor_table.h:176
#define SENSOR_NUM_FB_14_FAN_TACH_RPM
Definition: plat_sensor_table.h:161
#define SENSOR_NUM_FB_5_FAN_TACH_RPM
Definition: plat_sensor_table.h:152
#define SENSOR_NUM_BPB_RACK_LEVEL_2
Definition: plat_sensor_table.h:174
#define SENSOR_NUM_PB_2_PUMP_TACH_RPM
Definition: plat_sensor_table.h:165
#define SENSOR_NUM_FB_12_FAN_TACH_RPM
Definition: plat_sensor_table.h:159
#define SENSOR_NUM_MB_RPU_AIR_INLET_TEMP_C
Definition: plat_sensor_table.h:204
#define SENSOR_NUM_MB_FAN2_TACH_RPM
Definition: plat_sensor_table.h:172
#define SENSOR_NUM_FB_3_FAN_TACH_RPM
Definition: plat_sensor_table.h:150
#define SENSOR_NUM_FB_11_FAN_TACH_RPM
Definition: plat_sensor_table.h:158
#define SENSOR_NUM_FB_13_FAN_TACH_RPM
Definition: plat_sensor_table.h:160
#define SENSOR_NUM_FB_6_FAN_TACH_RPM
Definition: plat_sensor_table.h:153
#define SENSOR_NUM_FB_1_FAN_TACH_RPM
Definition: plat_sensor_table.h:148
#define SENSOR_NUM_FB_4_FAN_TACH_RPM
Definition: plat_sensor_table.h:151
#define SENSOR_NUM_FB_2_FAN_TACH_RPM
Definition: plat_sensor_table.h:149
#define SENSOR_NUM_FB_8_FAN_TACH_RPM
Definition: plat_sensor_table.h:155
#define SENSOR_NUM_FB_7_FAN_TACH_RPM
Definition: plat_sensor_table.h:154
#define SENSOR_NUM_BPB_RPU_COOLANT_INLET_TEMP_C
Definition: plat_sensor_table.h:201
#define SENSOR_NUM_BPB_RPU_COOLANT_OUTLET_TEMP_C
Definition: plat_sensor_table.h:202