mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-30 06:33:07 +00:00
49fdb28871
* test sd detect pin * sd detect support for f2 board
18 lines
No EOL
447 B
C
18 lines
No EOL
447 B
C
#include "api-hal-gpio.h"
|
|
|
|
// init GPIO
|
|
void hal_gpio_init(GpioPin* gpio, GpioMode mode, GpioPull pull, GpioSpeed speed) {
|
|
// TODO: Alternate Functions
|
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
|
|
|
GPIO_InitStruct.Pin = gpio->pin;
|
|
GPIO_InitStruct.Mode = mode;
|
|
GPIO_InitStruct.Pull = pull;
|
|
GPIO_InitStruct.Speed = speed;
|
|
|
|
HAL_GPIO_Init(gpio->port, &GPIO_InitStruct);
|
|
}
|
|
|
|
bool hal_gpio_read_sd_detect(void) {
|
|
return true;
|
|
} |