You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
usb-firewall-fork/Downstream/Inc/led.h

45 lines
918 B

/*
* led.h
*
* Created on: 19/08/2015
* Author: Robert Fisk
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#ifndef INC_LED_H_
#define INC_LED_H_
#include "stm32f4xx_hal.h"
typedef enum
{
LED_STATUS_STARTUP,
LED_STATUS_OFF,
LED_STATUS_FLASH_ERROR,
LED_STATUS_FLASH_UNSUPPORTED,
LED_STATUS_FLASH_BOTDETECT
}
LedStatusTypeDef;
void LED_Init(void);
void LED_SetState(LedStatusTypeDef newState);
void LED_Tick(void);
#define STARTUP_FLASH_DELAY_MS 500
#define LED_ERROR_BLINK_MS 100
#define LED_UNSUPPORTED_BLINK_MS 500
#define LED_BOTDETECT_BLINK_MS 100
#define LED_BOTDETECT_OFF_MS (1000 - (LED_BOTDETECT_BLINK_MS * 3)) //Two flashes, total period = 1 sec
#endif /* INC_LED_H_ */