GPIO_InitTypeDef GPIO_InitStructure; //定义GPIO宏操作结构体
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOB,ENABLE); //外设时钟配置,
开启GPIOB和GPIOD的时钟
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5|GPIO_Pin_3;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure); //配置GPIOB口
请问STM32的GPIO端口配置,最后一条语句,如果我想同时配置GPIOA和GPIOB,能这么写吗?为什么?谢谢
GPIO_Init(GPIOA | GPIOB, &GPIO_InitStructure); //配置GPIOB口