這樣配置對不對 板子壞了沒法驗證 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
#include "stm32f10x.h"
void LED_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure; //定義結構體變量
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOE ,ENABLE); //使能PB5,PE5 時鐘
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; //選擇端口位
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //配置推挽輸出模式
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; // IO輸出響應時間
//端口所在位 輸出方式都一樣 嘗試一起初始化 不用再重復配置端口 (等待驗證這樣配置對不對)
GPIO_Init (GPIOB, &GPIO_InitStructure);
GPIO_Init (GPIOE, &GPIO_InitStructure);
}
|