stm32 study notes for General multiplexing GPIO (not including interrupts)

https://www.cnblogs.com/Recca/p/7786967.html concise overview of the reset

https://blog.csdn.net/qq_29350001/article/details/54024070 // related to the keyword volatile

https://www.cnblogs.com/alvis-jing/p/3674986.html information about the GPIO, beginners look good way

https://blog.csdn.net/qq_29350001/article/details/80681244 // the GPIO summary, there are other links in the article is also great.

https://wenku.baidu.com/view/84aae02df705cc1754270948.html // multiplexing and re-mapping feature is described in detail

 

 

 

 

 

 

1、初始化程序
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOE, ENABLE); //使能 PB,PE 端口时钟
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; //LED0–>PB.5 推挽输出
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_SetBits(GPIOB,GPIO_Pin_5); //PB.5 输出高
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; //LED1–>PE.5 推挽输出
GPIO_Init(GPIOE, &GPIO_InitStructure);
GPIO_SetBits(GPIOE,GPIO_Pin_5); /PE.5 输出高

 

//一些补充

1、所有端口都有外部中断能力。为了使用外部中断线,端口必须配置成输入模式

2、具有独立的唤醒I/O口。  

3、很多I/O口的复用功能可以重新映射

//一些寄存器

 

 

 

 

//AFIO_MAPR

 

 

 

 

 

//这个寄存器有四个

 

 

 //一些库函数

 

 

 

Guess you like

Origin www.cnblogs.com/qingningyu/p/12309876.html