There is syntax error in each line. How to resolve it ? The controller which I work on is MKE02Z64VLD2 and the IDE which I use is Kinetis Design Studio.
(void)BitIoLdd1_Init(NULL); /* initialize the port pin PTB1 */
/* enable internal pull-up on PTB1 */
PORT_PDD_SetPinPullSelect(PORTB_BASE_PTR, 1, PORT_PDD_PULL_UP);
PORT_PDD_SetPinPullEnable(PORTB_BASE_PTR, 1, PORT_PDD_PULL_ENABLE);
WAIT1_Waitms(5); /* wait get pull-up a chance to pull-up */
if (!BL_SW_GetVal()) { /* button pressed (has pull-up!) */
WAIT1_Waitms(50); /* wait to debounce */
if (!BL_SW_GetVal()) { /* still pressed */
return TRUE; /* go into bootloader mode */
}
}
/* BTLD switch not pressed, and we have a valid user application vector */
return FALSE; /* do not enter bootloader mode */
}
Hi,
to check the problem efficiently, can you please provide:
1 your KDS version
2. post your demo project in zip here, thus we can look the problem directly.
thanks!
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
please click on the Action button, Edit
then you will see the Attach button is on bottom right of the Text Frame.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hey Zhang,
Could you find out the problem ?
I did attach the zip file of my code as per you instruction last friday. In case you didn't notice, kindly scroll up and peruse my previous comment. Thanks for helping.
Regards
Ganesh R
(I have attached in this comment once again )
Details:
Kinetis Design Studio Version: 2.0.0
Eclipse Version: Kepler (4.3.2)
Hi Ganesh,
I open your project with KDS3.0, I think I can see the same problem as you mentioned.
the problem is that I didn't see the code in read rectangle in a function. if i add a function name for instance gpio_init() ahead of this code, the syntax error is gone. see below i highlighted:
does this answers your question?
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks a lot Zhang. This completely will solve my problem :smileyhappy: . Will reach you if I get stuck when I progress through. Thanks again.
Regards
Ganesh R