Toggle LED on TEA128 using P&E generated code.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Toggle LED on TEA128 using P&E generated code.

Jump to solution
817 Views
saya
Contributor III

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

0 Kudos
1 Solution
364 Views
saya
Contributor III
0 Kudos
2 Replies
365 Views
saya
Contributor III
0 Kudos
364 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

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"

Help_on_component.png

Regards!,
Jorge Gonzalez

0 Kudos