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[]