Projet_Voilier/ProjetsKEIL/Projet_1/Src/Source/Principal.c
2023-03-17 11:57:56 +01:00

28 lines
485 B
C

#include "stm32f10x.h"
#include "Driver_GPIO.h"
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<<)
GPIOC->CRH &= ~(0x1 << 22)
GPIOC->CRH |= GPIO_CRH_CNF13_1;
GPIOC->ODR |= GPIO_ODR_ODR13;
//GPIOA->BSRR |= (1 << 21);
for (;;)
{
}
}