void PWM_Config(uint8_t TIM_PERIOD, uint8_t TIM_PULSE) { . . . } int main() { PWM_Config(); // THIS LINE SHOWS AN ERROR . . . }
ERROR LIST:
main.c(251): error: #165: too few arguments in function call PWM_Config();
BUT, If I write the program below, there is an no error
void PWM_Config() { . . . } int main() { PWM_Config(); // NO ERROR . . . }
KINDLY HELP!
please understand.I am not cleared with your words.
Initially, I programmed
The above program was been made, because some value is declared within the program.
Now. the values are input from outside of program so I am using COMMAND HANDLER so when I give certain value it should have to store in the TIM_PERIOD and TIM_PULSE .
so I am rewriting the program,like below
Now this shows an error. I want to know the exact reason.
Moreover, I also want to know the write way to call this below function from the int main()
void PWM_Configvoid PWM_Config(uint8_t TIM_PERIOD, uint8_t TIM_PULSE)
Thank you
I normally don't like responding to posts from consultants.
The reason is simple. You're stating that the function PWM_Config takes two parameters. Then you attempt to call it with none.
If you want to call it from main (or anywhere else), you MUST supply two arguments to go with it.
Example:
int main() { PWM_Config(1,2) . . . }
This is basic C!
Thanks. Got it.
Maybe read this? www.shrani.si/.../cfordummies.pdf