#ifndef __LED_H
#define __LED_H

#include <stdint.h>
typedef union
{
    struct
    {
        uint8_t led0_state_flag : 1;
        uint8_t led1_state_flag : 1;
        uint8_t led2_state_flag : 1;
        uint8_t led3_state_flag : 1;
        uint8_t led4_state_flag : 1;
        uint8_t led5_state_flag : 1;
        uint8_t led6_state_flag : 1;
        uint8_t led7_state_flag : 1;
    } bits;
    uint8_t led_all_state;
} led_state_t;

typedef struct
{
    led_state_t led_state;
    uint8_t     i;
} led_t;

extern led_t led;

void led_on_off(uint8_t leds, uint8_t on_off);

#endif // __LED_H