tebron
Member level 1

Hello,
I would like to submit my question to you experts of c since I am a beginner and I do not know how to solve the problem. I have a function that takes as a parameter a pointer to void, I have to pass a value of one or zero to turn on or off a led. I tried the code below, but, even if the compiler is free of errors in reality the value in the variable bLed remains always zero. Can you give me any guidance as to operate the routine? Thank you
very much.
main(void)
{
while(1)
{
TaskLedUno((BOOL*)1);
}
}
void TaskLedUno(void *pFlagLed)
{
BOOL bLed;
//while(1)
{
bLed=*(BOOL*)pFlagLed;
pLED_1(bLed);
}
}
I would like to submit my question to you experts of c since I am a beginner and I do not know how to solve the problem. I have a function that takes as a parameter a pointer to void, I have to pass a value of one or zero to turn on or off a led. I tried the code below, but, even if the compiler is free of errors in reality the value in the variable bLed remains always zero. Can you give me any guidance as to operate the routine? Thank you
very much.
main(void)
{
while(1)
{
TaskLedUno((BOOL*)1);
}
}
void TaskLedUno(void *pFlagLed)
{
BOOL bLed;
//while(1)
{
bLed=*(BOOL*)pFlagLed;
pLED_1(bLed);
}
}