PER Firmware
Loading...
Searching...
No Matches
led.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "common/phal_F4/gpio/gpio.h"
#include "common/phal_F4/spi/spi.h"
Include dependency graph for led.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_NUM_LED   14
 
#define LED_PUMP_1   (0)
 
#define LED_PUMP_2   (1)
 
#define LED_DLBK   (2)
 
#define LED_DLFR   (3)
 
#define LED_SDC   (4)
 
#define LED_MAIN   (5)
 
#define LED_DASH   (6)
 
#define LED_ABOX   (7)
 
#define LED_HXFAN   (8)
 
#define LED_5V_FAN   (9)
 
#define LED_TV   (10)
 
#define LED_DAQ   (11)
 
#define LED_5V_CRIT   (12)
 
#define LED_BLT   (13)
 

Enumerations

enum  LED_state { LED_OFF = 0 , LED_ON , LED_BLINK }
 

Functions

bool LED_control (int led, enum LED_state state)
 Set, clear, or toggle a specified LED pin.
 
void LED_periodic ()
 Periodic LED function that toggles LEDs that need to be toggled.
 
uint8_t get_LED_status (int led)
 Get the status of a specified LED pin.
 

Detailed Description

Author
Charles Tamer (ctame.nosp@m.r@pu.nosp@m.rdue..nosp@m.edu)
Version
0.1
Date
2024-1-13

Macro Definition Documentation

◆ LED_5V_CRIT

#define LED_5V_CRIT   (12)

◆ LED_5V_FAN

#define LED_5V_FAN   (9)

◆ LED_ABOX

#define LED_ABOX   (7)

◆ LED_BLT

#define LED_BLT   (13)

◆ LED_DAQ

#define LED_DAQ   (11)

◆ LED_DASH

#define LED_DASH   (6)

◆ LED_DLBK

#define LED_DLBK   (2)

◆ LED_DLFR

#define LED_DLFR   (3)

◆ LED_HXFAN

#define LED_HXFAN   (8)

◆ LED_MAIN

#define LED_MAIN   (5)

◆ LED_PUMP_1

#define LED_PUMP_1   (0)

◆ LED_PUMP_2

#define LED_PUMP_2   (1)

◆ LED_SDC

#define LED_SDC   (4)

◆ LED_TV

#define LED_TV   (10)

◆ MAX_NUM_LED

#define MAX_NUM_LED   14

Enumeration Type Documentation

◆ LED_state

enum LED_state
Enumerator
LED_OFF 
LED_ON 
LED_BLINK 

Function Documentation

◆ get_LED_status()

uint8_t get_LED_status ( int led)

Get the status of a specified LED pin.

Parameters
ledLED driver pin
Returns
enum for the LED state

◆ LED_control()

bool LED_control ( int led,
enum LED_state state )

Set, clear, or toggle a specified LED pin.

Parameters
spiSPI hande
ledLED driver pin
stateDesired state of the LED : SET, CLEAR, or TOGGLE
Returns
true if data transfer is successful
false if data transfer fails
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LED_periodic()

void LED_periodic ( )

Periodic LED function that toggles LEDs that need to be toggled.

Parameters

return

Here is the call graph for this function:
Here is the caller graph for this function: