Files
@ d651f75c8fbc
Branch filter:
Location: HydroBot/protomodule-firmware/Inc/gpio.h - annotation
d651f75c8fbc
497 B
text/plain
Added ability to read ph meter from analog input
a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 a6cb9f350919 | #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_ */
|