I am declaring a static function in a header file and initializing it in .C file but i get a warning that says:unused function.
header file:
static void SetLEDPort2Output(void);
.c file:
static void SetLEDPort2Output(void)
{
for(int i = 0;i < 7;i++)
{
LEDPort.aGPIO[i]->CRL &= ~(0x0Fu<<(4*LEDPort.aPIN[i]));
LEDPort.aGPIO[i]->CRL |= (0x01<<(4*LEDPort.aPIN[i]));
}
}
void LEDPortIni(void)
{
RCC->APB2ENR |= 0x1<<2;
SetLEDPort2Output();
}
I do not know what am i missing here.