- 0
- 0
- 约3.9千字
- 约 4页
- 2025-05-10 发布于江苏
- 举报
FreescaleMQXRTOampleGuide
HMIexample
ThisdocumentdescribestheHMIexample,whichdemonstratestheuseofthe
HMIlayerinMQXtohandlebuttons,touchelectrodesandLEDs.
Pre-requisites
ThiamplerequiresBSPwithimplementedHMIlayer(KinetisK60for
example).
Morereading
TheHMIlayerusesTouchSensingSoftwarelibrary.
MoreinformationaboutTouchSensingSoftwareisavailableat:
Theexample
TheHMIexampleprogramdemonstratesHMIapplicationlayerwhichhandles
touchsensingboardbuttons,pushbuttonsandLEDs.Thecallbacksforbutton
statechanges(pushorrelease)areregisteredwithacallbackfunctiontobe
invoked.Onerotarycallbackisregisteredforthemovementevent.Each
callbackfunctionprintstheactionwhichhasoccurred.
Runningtheexample
Toruntheexamplethecorrespondingterminalprogramisneededforprinting
informationandsettingdesiredmodule.
Explanationoftheexample
Theapplicationexamplecreatestwotasks:
•ThemaintaskcallstheBTNLEDclientinitializationfunctionwhich
initializestouchsensingbuttons(TSS),pushbuttons(LWGPIO)andLEDs
availableonthetowerboard.TwoLEDsaresetandcallbacksare
registeredforthefirst12HMIbuttonsandonerotarycontrol.
Twofunctionsarecalledinthepermanentloop.Thepollfunctionwhich
pollsTSSandLWGPIObuttons.Thesecondfunctionistimedelaywhich
givesaruntimetoexecutelowerprioritytask.
•Theshelltaskexecutestheshell(command-lineinterface).Theshell
enablestosetaHMITSSmoduleortogetanactivemodule.TheHMITSS
module0issetbydefault.
Fourshellcommandsareavailable:
omodule[number]–telltheTSSlayerwhatTWRPIdaughtercardis
pluggedintotheboard
oget-getanactiveHMIT
原创力文档

文档评论(0)