#define rcc_base_address 0x40021000
#define gpoia_base_address 0x50000000
volatile int *ena = (volatile int*)(0x34 + rcc_base_address);
volatile int *dira = (volatile int*)(0x00 + gpoia_base_address);
volatile int *typa = (volatile int*)(0x04 + gpoia_base_address);
volatile int *outa = (volatile int*)(0x14 + gpoia_base_address);
void setup(){
*ena |= 0b1;
*dira &= ~(1<<5);
*dira |=01<<4;
*typa &= ~(1<<2);
}
void loop() {
// put your main code here, to run repeatedly:
*outa|= 0b100;
delay(2000);
*outa=0x00;
delay(2000); // this speeds up the simulation
}