Hi, all,
I was following the P&E example for GPIO LED. I am still a bit uncertain and need a bit more view/explanation about the library generated by P&E for GPIO_LLD.
once you generated the code for GPIO_LLD, I have those functions:
#define GPIO_LED_Init_METHOD_ENABLED /*!< Init method of the component GPIO_LED is enabled (generated) */
#define GPIO_LED_SetFieldValue_METHOD_ENABLED /*!< SetFieldValue method of the component GPIO_LED is enabled (generated) */
#define GPIO_LED_GetFieldValue_METHOD_ENABLED /*!< GetFieldValue method of the component GPIO_LED is enabled (generated) */
#define GPIO_LED_ClearFieldBits_METHOD_ENABLED /*!< ClearFieldBits method of the component GPIO_LED is enabled (generated) */
#define GPIO_LED_SetFieldBits_METHOD_ENABLED /*!< SetFieldBits method of the component GPIO_LED is enabled (generated) */
#define GPIO_LED_ToggleFieldBits_METHOD_ENABLED /*!< ToggleFieldBits method of the component GPIO_LED is enabled (generated) */
GPIO_LED is the name for my GPIO component.
after GPIO_Init, I am not sure how to turn on the LED and off it because I am not sure what is the field parameter and so is mask.
Could someone give me a simple hint/example of how to use these function? Such as, turn on LEDs.
I attached the generated code from P&E for GPIO.
Any help is appreciated.
Alan
Original Attachment has been moved to: GPIO_LED.h.txt.zip
Original Attachment has been moved to: GPIO_LED.c.txt.zip
解決済! 解決策の投稿を見る。
I followed this tutorial and get my working!
Tutorial: Bits and Pins with Kinetis and the FRDM-KL25Z Board | MCU on Eclipse
I followed this tutorial and get my working!
Tutorial: Bits and Pins with Kinetis and the FRDM-KL25Z Board | MCU on Eclipse
Hello Alan Tian:
I am glad you found Erich Styger's tutorial. That tutorial is for using BitIO_LDD component.
In case you are still interested in the GPIO_LDD component I attached an example with this one for TRK-KEA128, which simply turns on the 4 blue leds sequencially.
Also, when in doubt how to use the generated APIs, you can refer to the "Typical Usage". For this right click on the component -> Help on Component, then select "Component xxx Typical Usage"
Regards!,
Jorge Gonzalez