AnsweredAssumed Answered

Toggle LED on TEA128 using P&E generated code.

Question asked by Alan Tian on Feb 5, 2015

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

Outcomes