Forumdan bir hocam bana ST Nucleo gönderdi.Kendisine çok teşekkür ederim :) İsim vermiyorum, çok gizli 8)
Bir start uygulaması yapayım dedim siftah olsun :D
main.c
/*****************************************************************************
* File Name : main.c
* Description : GPIO_Uygulaması
* Developer : Baran EKREM
********************************************************************************
* Additional Information : A0 pininin lojik durmunu değiştiren program
*******************************************************************************/
#include "stm32f4xx_conf.h"
static void Init_GPIO(void);
static void Delay(__IO uint32_t nCount);
/***********************************************************
* Function Name : main
* Description : ana program burada işlenir
* Input : void
* Return : return
***********************************************************/
int main(void)
{
Init_GPIO();
while(1)
{
GPIO_SetBits(GPIOA,GPIO_Pin_0);
Delay(0x3FFFF);
GPIO_ResetBits(GPIOA,GPIO_Pin_0);
Delay(0x3FFFF);
}
}
/***********************************************************
* Function Name : Init_GPIO
* Description : GPIO ayarları
* Input : void
* Return : void
***********************************************************/
static void Init_GPIO(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(GPIOA,&GPIO_InitStructure);
}
/***********************************************************
* Function Name : Delay
* Description : Gecikme fonksiyonu
* Input : __IO uint32
* Return : void
***********************************************************/
static void Delay(__IO uint32_t nCount)
{
while(nCount--) {
}
}