//#define mod1 PD0
//#define mod2 PD2
void setup() {
  // put your setup code here, to run once:
  GPIOA->MODER &= ~0xFFFF;
  GPIOA->MODER |= 0x5555;

  GPIOA->PUPDR &= ~0xFFFF;
  GPIOA->PUPDR |= 0xAAAA;

  GPIOC->MODER &= ~0xFFFF;
  GPIOC->MODER |= 0x5555;

  GPIOC->PUPDR &= ~0xFFFF;
  GPIOC->PUPDR |= 0xAAAA;

  GPIOB->MODER &= ~0xFFFF;
  GPIOB->MODER |= 0x0000;

  GPIOB->PUPDR &= ~0xFFFF;
  GPIOB->PUPDR |= 0xAAAA;

 pinMode(PD0, INPUT_PULLDOWN);
 pinMode(PD1, INPUT_PULLDOWN);

  Serial.begin(115200);
  Serial.println("Hello, STM32!");
}
int slide;
void loop() {
  GPIOA->ODR = 0x0000;
  GPIOC->ODR = 0x0000;

    if((GPIOB->IDR & 0x0001)!= 0){
    digitalWrite(GPIOA->ODR = 0xFFFF, digitalRead(PD0));
    digitalWrite(GPIOC->ODR = 0xFFFF, digitalRead(PD1));
    }
  }
  // put your main code here, to run repeatedly:
  // this speeds up the simulation