源码---
#define PAin(n) (*(volatile uint32_t *)(0x42000000 + (GPIOA_BASE+0x10-0x40000000)*32 + (n)*4))
#define PEin(n) (*(volatile uint32_t *)(0x42000000 + (GPIOE_BASE+0x10-0x40000000)*32 + (n)*4))
#define PEout(n) (*(volatile uint32_t *)(0x42000000 + (GPIOE_BASE+0x14-0x40000000)*32 + (n)*4))
#define PFout(n) (*(volatile uint32_t *)(0x42000000 + (GPIOF_BASE+0x14-0x40000000)*32 + (n)*4))
int main(void)
{
key_init();
Led_init();
while(1){
if(PAin(0))
PFout(9)=0;
else
PFout(9)=1;
if(PEin(2))
PFout(10)=0;
else
PFout(10)=1;
}
}