Files @ ab94f8a0a0c6
Branch filter:

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

matthewreed
Read analog ph sensor
#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_ */