-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/OhMeuMenino/STM32F4-with-…
- Loading branch information
Showing
2 changed files
with
23 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,35 @@ | ||
/* | ||
** Start project. It includes all Standart Peripherals Library | ||
** | ||
** Main.c | ||
** | ||
** This projects configure the GPIO G13 to blink the LED3 (green) | ||
** | ||
**********************************************************************/ | ||
/* | ||
Last committed: $Revision: 00 $ | ||
Last changed by: $Author: $ | ||
Last changed date: $Date: $ | ||
ID: $Id: $ | ||
Last changed by: OhMeuMenino | ||
Last changed date: May 2017 | ||
**********************************************************************/ | ||
#include "stm32f4xx_conf.h" | ||
|
||
int main(void) | ||
{ | ||
while(1) | ||
{ | ||
|
||
} | ||
/* GPIOG Peripheral clock enable */ | ||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOG, ENABLE); | ||
|
||
/* Configure the PIN13 on PORTG */ | ||
GPIO_InitTypeDef PORTG; | ||
PORTG.GPIO_Pin = GPIO_Pin_13; // Pin 13 | ||
PORTG.GPIO_Mode = GPIO_Mode_OUT; // Output | ||
PORTG.GPIO_OType = GPIO_OType_PP; // Output Type - Push-pull mode | ||
PORTG.GPIO_Speed = GPIO_Speed_100MHz; | ||
PORTG.GPIO_PuPd = GPIO_PuPd_NOPULL; | ||
GPIO_Init(GPIOG, &PORTG); | ||
|
||
int i=1000000; | ||
while(1) | ||
{ | ||
GPIO_ToggleBits(GPIOG, GPIO_Pin_13); | ||
for(i=1000000;i>0;i--); | ||
} | ||
|
||
} |