Files @ 3ffc65a90345
Branch filter:

Location: HydroBot/protomodule-firmware/Inc/gpio.h - annotation

matthewreed
Fixed subrepo
#ifndef _GPIO_H_
#define _GPIO_H_

#include "stm32f0xx_hal.h"
#include <stdbool.h>
#include <led.h>
#include <protocol.h>
#include <config.h>

#define GPIO_NUM_LEDS 3

typedef struct {
    uint16_t pin;
    GPIO_TypeDef* port;
    TIM_HandleTypeDef* timer;
    uint16_t channel;
} gpio_led_t;

void gpio_init(void);
bool gpio_set_led(led_name_t led, bool value);
bool gpio_toggle_led(led_name_t led);
bool gpio_set_led_brightness(uint8_t brightness);

#endif /*_GPIO_H_ */