unsigned int *GPIOE_ODR= (unsigned int *)(0x4001180c);
unsigned int *GPIOB_ODR= (unsigned int *)(0x40010c0c);
void LED1(char flag){
if(flag==0){
*GPIOE_ODR&=~(1<<5);
}
else{
*GPIOE_ODR|=(1<<5);
}
}
void LED0(char flag){
if(flag==0){
*GPIOB_ODR&=~(1<<5);
}
else{
*GPIOB_ODR|=(1<<5);
}
}
void delay(unsigned int x){
unsigned int i;
while(x--){
for(i=500;i>0;i--);
}
}
int main(void){
*(unsigned int *)(0x40021018)|=(1<<3);
*(unsigned int *)(0x40021018)|=(1<<6);
*(unsigned int *)(0x40011800)|=(1<<20);
*(unsigned int *)(0x40010c00)|=(1<<20);
#if 1 //这里置一或者清零都不对实验现象产生影响
*(unsigned int *)(0x40011800)&=~(1<<22);
*(unsigned int *)(0x40010c00)&=~(1<<22);
#endif