/********************************* (C) РОТЕК ***********************************
 * @module  led
 * @file    led.h
 * @version 1.0.0
 * @date    XX.XX.XXXX
 * $brief   led
 *******************************************************************************
 * @history     Version  Author         Comment
 * XX.XX.XXXX   1.0.0    Telenkov D.A.  First release.
 *******************************************************************************
 */

/* Define to prevent recursive  ----------------------------------------------*/
#ifndef LED_H
#define LED_H
   
#include "stm32f4xx.h"
#include "gpio.h"

typedef enum
{
  GREEN_STATUS,
  RED_STATUS,
  
} LED_NAMES_t;

typedef enum
{
  GREEN = 0,
  RED,
  YELLOW,
  
} COLOR_t;

typedef enum
{
  TOGGLE_ON = 0,
  TOGGLE_OFF,
  
} TOGGLE_t;

typedef struct
{
  COLOR_t     color;
  TOGGLE_t    toggle;
  
} LED_STATE_t;

/**
  * @brief  
  */
void LED_Init(void);

/**
  * @brief  Задача простой мигалки
  */
void vTaskLedBlink(void *pvParameters);

/**
  * @brief  
  */
void LED_On(gpio_t pin);

/**
  * @brief  
  */
void LED_Off(gpio_t pin);

/**
  * @brief  Изменить состояние LED 
  */
void LED_Toggle(gpio_t pin);

/**
  * @brief  
  */
void LED_SetStatusLedFreq(uint16_t freq);

#endif /* #ifndef LED_H */

/********************************* (C) РОТЕК **********************************/
