#include "stm32f10x.h" #include "Driver_GPIO.h" // PA5 LED // PC13 BP MyGPIO_Struct_TypeDef LED; int main ( void ) { // Clocks des ports A, B, C //RCC->APB2ENR |= (0x01 << 2) | (0x01 << 3) | (0x01 << 4) ; GPIOA->CRL &= ~(0xF << 20); // Mise à 0 GPIOA->CRL |= (0x1 << 20); // Output GPIOA->BSRR |= (0x01 << 5); // Configure PC13 as input with pull-up GPIOC->CRH &=~ (1<<13); GPIOC->CRH &= ~(0x1 << 22); GPIOC->CRH |= GPIO_CRH_CNF13_1; // BP = PC13 GPIOC->ODR |= GPIO_ODR_ODR13; //GPIOA->BSRR |= (1 << 21); while(1) { } }