IO口单独配置可如下:
#define A1 PCout(6)
#define B1 PCout(7)
RCC->APB2ENR|=1<<4; //I/O port C enable clock
GPIOC->CRL&=0X00FFFFFF; //C6&7 init
GPIOC->CRL|=0X33000000; //set C6&7 push-pull ouput 50MHZ mode
GPIOC->ODR=1<<6; //set C6&7 output high
GPIOC->ODR=1<<7;
请问怎么同时配置PB从0到7口? |