PHiLIP
led_flash.c File Reference

Flashes the LED, the most important thing in embedded. More...

#include "stm32f1xx_hal.h"
#include "app_defaults.h"
#include "port.h"

Macros

#define START_WAIT_FLASHES   (6 * 2)
 How long it takes to indicate the start of led flashing.
 
#define WAIT_FLASHES   (2 * 2)
 How long it takes to indicate the next led flashing state.
 
#define MAJOR_FLASHES   ((FW_REV_MAJOR + 1) * 2)
 Start flash waits longer than the normal waits.
 
#define MINOR_FLASHES   ((FW_REV_MINOR + 1) * 2)
 Start flash waits longer than the normal waits.
 
#define PATCH_FLASHES   ((FW_REV_PATCH + 1) * 2)
 Start flash waits longer than the normal waits.
 
#define FLASH_TIME_MS   150
 How long the led takes to toggle in ms.
 

Enumerations

enum  FLASH_STATE {
  FLASH_START, FLASH_MAJOR, FLASH_WAIT_MAJOR, FLASH_MINOR,
  FLASH_WAIT_MINOR, FLASH_PATCH
}
 The states of flashing the led. More...
 

Functions

void init_led_flash ()
 Initialize LED0 gpio.
 
void flash_fw_version ()
 Flashes the firmware major, minor, and patch version (+1) on on the led. More...
 

Detailed Description

Flashes the LED, the most important thing in embedded.

Author
Kevin Weiss
Date
21.02.2019