bs_bcu_app/drv/drv_gpio.h

23 lines
504 B
C
Raw Normal View History

2024-11-13 18:11:22 +08:00
#ifndef _DRV_GPIO_H
#define _DRV_GPIO_H
#include "stdio.h"
#include "drv_sys.h"
#include "stm32f4xx_hal.h"
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E1B9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF>GPIO<49><4F><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>
typedef struct {
GPIO_TypeDef* port; // GPIO<49>˿<EFBFBD>
uint16_t pin; // GPIO<49><4F><EFBFBD>ź<EFBFBD>
uint32_t mode; // GPIOģʽ
uint32_t pull; // <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
uint32_t speed; // <20>л<EFBFBD><D0BB>ٶ<EFBFBD>
uint32_t alternate; // <20><><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>
} GPIOConfig;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>GPIO<49><4F><EFBFBD>ź<EFBFBD><C5BA><EFBFBD>
void InitGPIOs(void);
2024-11-20 15:33:37 +08:00
#endif // GPIO_CONFIG_H