#include "stm32f4xx.h"
#include "stm32f4xx_gpio.h"
void Delay()
{
for(int i=0;i<500000;i++);
}
int main()
{
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
GPIOA -> MODER |= GPIO_MODER_MODER6_0;
// GPIOA -> MODER |= GPIO_MODER_MODER8_0;
while(1)
{
GPIOA -> ODR |= 0x00000040 ;//GPIO_ODR_6;
Delay();
GPIOA -> ODR &= ~0x00000040;
Delay();
}
}
No comments:
Post a Comment