PER Firmware
Loading...
Searching...
No Matches
led.c File Reference
#include "led.h"
#include "main.h"

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.
 

Variables

SPI_InitConfig_t spi_config
 
uint16_t LED_control_data = 0x0000
 
uint16_t LED_toggle = 0x0000
 

Detailed Description

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

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

◆ LED_periodic()

void LED_periodic ( )

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

Parameters

return