13 lines
244 B
C
13 lines
244 B
C
#pragma once
|
|
|
|
#include "gpio.h"
|
|
|
|
typedef struct
|
|
{
|
|
GPIO_TypeDef *port;
|
|
uint16_t pin;
|
|
} led_handle_t;
|
|
|
|
void led_init(led_handle_t *hled, GPIO_TypeDef *port, uint16_t pin);
|
|
void led_on(led_handle_t *hled);
|
|
void led_off(led_handle_t *hled); |