/** * @brief Led Controller module * @details This file outputs a byte of data to the pins for led indication. * @author Jake G * @date 2024-08-21 * @copyright None * @file LEDCONTROLLER.h */ #ifndef LEDCONTROLLER #define LEDCONTROLLER #include "stdbool.h" #include /** * A structure representing an LED */ typedef struct Led { uint8_t *port; uint8_t pin_num; bool state; } Led; typedef struct LedByte { Led leds[8]; } LedByte; /** * Returns a instance of the LedByte structure. */ LedByte LedController_New(uint8_t *port); /** * Displays the byte of data via led pins. */ void LedController_ShowByte(LedByte *led_byte); /** * Clears out the byte led representation */ void LedControler_ClearByte(LedByte *led_byte); /** * Sets a AVR Led to High/on. * @param led Pointer to an Led structure. */ void LedController_SetHigh(Led *led); /** * Sets a AVR Led to Low/off. * @param led Pointer to an Led structure. */ void LedController_SetLow(Led *led); #endif // LEDCONTROLLER