Files @ 6f05f30b23be
Branch filter:

Location: HydroBot/hydrobot-sharedlibs/inc/led.h - annotation

matthewreed
Added led interface lib
/*
 * led.h
 *
 *  Created on: Mar 30, 2017
 *      Author: Matthew Reed
 */

#ifndef INC_LED_H_
#define INC_LED_H_

#include "stm32f0xx_hal.h"
#include <stdbool.h>
#include <string.h>

typedef enum {
    LED_STATUS = 0,
    LED_CAN,
    LED_ERROR,
} led_name_t;

void led_init(void);
void led_start(led_name_t led);
void led_start_time(led_name_t led, uint16_t time);
void led_update(led_name_t led);
void led_update_all(void);
void led_set(led_name_t led, bool value);
void led_toggle(led_name_t led);

__weak bool gpio_set_led(led_name_t led, bool value);
__weak bool gpio_toggle_led(led_name_t led);

#endif /* INC_LED_H_ */