请帮我输出一段STM32的代码,用于实现PA1连接的led闪烁

我们可以使用以下代码实现PA1连接的LED闪烁:// 定义LED管脚和PA1 #define LED_PORT GPIOA #define LED_PIN GPIO_PIN_1// 初始化 GPIO void GPIO_init(void) { GPIO_InitTypeDef GPIO_InitStruct; // 打开时钟 __HAL_RCC_GPIOA_CLK_ENABLE(); // 配置PA1为输出 GPIO_InitStruct.Pin = LED_PIN; GPIO_InitStruct.Mode = GPIO_MODE_OUT

猜你喜欢

转载自blog.csdn.net/weixin_35749796/article/details/129601388
PA1