PER Firmware
Loading...
Searching...
No Matches
led.h
Go to the documentation of this file.
1
11#ifndef _LED_H
12#define _LED_H
13
14#include <stdbool.h>
15#include <stdint.h>
16
17#include "common/phal/gpio.h"
18#include "common/phal/spi.h"
19
20#define MAX_NUM_LED 14
21
22// LED Driver Pins (value = TLC59281 OUT pin number)
23#define LED_PUMP_1 (0)
24#define LED_PUMP_2 (1)
25#define LED_DLBK (2)
26#define LED_DLFR (3)
27#define LED_SDC (4)
28#define LED_MAIN (5)
29#define LED_DASH (6)
30#define LED_ABOX (7)
31#define LED_HXFAN (8)
32#define LED_5V_FAN (9)
33#define LED_TV (10)
34#define LED_DAQ (11)
35#define LED_5V_CRIT (12)
36#define LED_BLT (13)
37
38enum LED_state {
39 LED_OFF = 0,
40 LED_ON,
41 LED_BLINK
42};
43
53bool LED_control(int led, enum LED_state state);
54
61void LED_periodic();
62
69uint8_t get_LED_status(int led);
70
71#endif /* _LED_H */
void LED_periodic()
Periodic LED function that toggles LEDs that need to be toggled.
Definition led.c:86
bool LED_control(int led, enum LED_state state)
Set, clear, or toggle a specified LED pin.
Definition led.c:20
uint8_t get_LED_status(int led)
Get the status of a specified LED pin.
Definition led.c:94