[refactor] prepare for link gen

This commit is contained in:
2023-08-15 16:18:48 +02:00
parent 76ba24e527
commit 3e7c5c5089
30 changed files with 1387 additions and 1076 deletions

View File

@@ -0,0 +1,19 @@
#include "led.h"
void led_init(led_handle_t *hled, GPIO_TypeDef *port, uint16_t pin)
{
hled->port = port;
hled->pin = pin;
HAL_GPIO_WritePin(port, pin, GPIO_PIN_SET);
}
void led_on(led_handle_t *hled)
{
HAL_GPIO_WritePin(hled->port, hled->pin, GPIO_PIN_RESET);
}
void led_off(led_handle_t *hled)
{
HAL_GPIO_WritePin(hled->port, hled->pin, GPIO_PIN_SET);
}