This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Warning:no previous prototype for function 'delay'

Why am I getting this warning ??

#include "stm32f0xx.h" // Device header

void delay()
{
for (int i=0;i<100000;i++);
}

int main()
{

RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
GPIOA->MODER |= GPIO_MODER_MODER5_0;

while(1)
{
GPIOA->BSRR |= GPIO_BSRR_BS_5;
delay();
GPIOA->BSRR |= GPIO_BSRR_BR_5;
delay();
}


}