MC-13226 LED config

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC-13226 LED config

1,288件の閲覧回数
harishvenkatach
Contributor III

How to configure LEDs in the MC-13226 board? Basically, the LEDs have to toggle based on commands from an external signal.

ラベル(1)
2 返答(返信)

1,094件の閲覧回数
AngelC
Senior Contributor I

Hello Harish,

BeeKit application examples already contain a LED driver you could use for any purpose. The file location depends in the codebase used, for instance:

  • In ARM7 SMAC  Codebase 1.1.7, you will find it in \Application\Utilities\Led.c
  • In ARM7 BeeStack Codebase 3.1.1, it is located in \PLM\Interface\Led.c

This driver contains functions such as LED_TurnOnLed (),LED_ToggleLed(), etc. I am pretty sure you will find it very useful for your application.

Regards,

AngelC

1,094件の閲覧回数
minhcuong
Contributor II

You can do follow the example
external signal is key4
In  "BeeApp.c" file you find "BeeAppHandleKeys void function (key_event_t events)"
You modify

gKBD_EventSW4_c case:

..........

...........

break;

into


gKBD_EventSW4_c case:
     SetOneLed (LED4, gLedToggle_c);

break;


When the program starts, you press key 4, then Led 4 will toggle.

The Functions of LEDs you can find and modify in folder

PLM->Source->Led->Led.c

Hope this example will help you.