We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi guy,
I'm using ARM STM32F103RC, Cortex M3.
when I compiler the code with this order:
//GPIO structure used to initialize port
GPIO_InitTypeDef GPIO_InitStructure;
//Enable clock on APB2 pripheral bus where button and LEDs are connected
RCC_APB2PeriphClockCmd(LEDPORTCLK | BUTTONPORTCLK, ENABLE);
is okay,
But I want to enable clock first,
the compiler give the error
main.c(28): error: #268: declaration may not appear after executable statement in block
would you like to explain to me why this happened?
Minh
Hi Chris,
Thank you very much for your spending time to point my "hole of knowledge "
I got it.
Thanks,