diff options
author | Thomas Gravekamp <me@thomas-gravekamp.nl> | 2018-05-12 21:08:07 +0200 |
---|---|---|
committer | Thomas Gravekamp <me@thomas-gravekamp.nl> | 2018-05-12 21:08:57 +0200 |
commit | 3c0087f02833510658bfcc6a0e5ca748adeb7f9f (patch) | |
tree | 83d1c628275ef58b0274319e5cfc512cbc96a24f /src/main.c | |
parent | a820800817945d1e548daf268a71125d65dafd11 (diff) |
Make all templates consistent with each other.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -7,20 +7,20 @@ static void delay (unsigned int time) { } int main (void) { - // Turn on the GPIOA peripheral - RCC->AHBENR |= RCC_AHBENR_GPIOAEN; + // Turn on the GPIOC peripheral + RCC->AHBENR |= RCC_AHBENR_GPIOCEN; - // Put pin in general purpose output mode (B01) - GPIOA->MODER |= GPIO_MODER_MODER4_0; + // Put pin 13 in general purpose output mode + GPIOC->MODER |= GPIO_MODER_MODER13_0; while (1) { - // Reset the bit for port A4 - GPIOA->BSRR = GPIO_BSRR_BR_4; + // Reset the state of pin 13 to output low + GPIOC->BSRR = GPIO_BSRR_BR_13; delay(500); - // Set the bit for port A4 - GPIOA->BSRR = GPIO_BSRR_BS_4; + // Set the state of pin 13 to output high + GPIOC->BSRR = GPIO_BSRR_BS_13; delay(500); } |