外文翻译格式参考Word文档格式.docx
- 文档编号:16399493
- 上传时间:2022-11-23
- 格式:DOCX
- 页数:13
- 大小:350.76KB
外文翻译格式参考Word文档格式.docx
《外文翻译格式参考Word文档格式.docx》由会员分享,可在线阅读,更多相关《外文翻译格式参考Word文档格式.docx(13页珍藏版)》请在冰豆网上搜索。
1.1µ
C/GUIfeatures
C/GUIisdesignedtoprovideanefficient,processor-andLCDcontroller-indepen-dentgraphicaluserinterfaceforanyapplicationthatoperateswithagraphicalLCD.Itiscompatiblewithsingle-taskandmultitaskenvironments,withaproprietaryoperatingsystemorwithanycommercialRTOS.µ
C/GUIisshippedas"
sourcecode.ItmaybeadaptedtoanysizephysicalandvirtualdisplaywithanyLCDcon-trollerandCPU.Itsfeaturesincludethefollowing:
1.1.1General
Any8/16/32-bitCPU;
onlyanANSI"
compilerisrequired.
Any(monochrome,grayscaleorcolor)LCDwithanycontrollersupported(iftherightdriverisavailable).
MayworkwithoutLCDcontrolleronsmallerdisplays.
Anyinterfacesupportedusingconfigurationmacros.
Display-sizeconfigurable.
CharactersandbitmapsmaybewrittenatanypointontheLCD,notjustoneven-numberedbyteaddresses.
Routinesareoptimizedforbothsizeandspeed.
Compiletimeswitchesallowfordifferentoptimizations.
ForslowerLCDcontrollers,LCDcanbecachedinmemory,reducingaccesstoaminimumandresultinginveryhighspeed.
Clearstructure.
Virtualdisplaysupport;
thevirtualdisplaycanbelargerthantheactualdisplay.
1.1.2Graphiclibrary
Bitmapsofdifferentcolordepthssupported.
Bitmapconverteravailable.
Absolutelynofloating-pointusage.
Fastline/pointdrawing(withoutfloating-pointusage).
Veryfastdrawingofcircles/polygons.
Differentdrawingmodes.
1.1.3Fonts
Avarietyofdifferentfontsareshippedwiththebasicsoftware:
4*6,6*8,6*9,8*8,8*9,8*16,8*17,8*18,24*32,andproportionalfontswithpixel-heightsof8,10,13,16.Formoreinformation,seeChapter25:
"
StandardFonts"
.
Newfontscanbedefinedandsimplylinkedin.
Onlythefontsusedbytheapplicationareactuallylinkedtotheresultingexecut-able,resultinginminimumROMusage.
Fontsarefullyscalable,separatelyinXandY.
Fontconverteravailable;
anyfontavailableonyourhostsystem(i.e.Microsoft
Windows)canbeconverted.
1.1.4String/valueoutputroutines
Routinestoshowvaluesindecimal,binary,hexadecimal,anyfont.
Routinestoeditvaluesindecimal,binary,hexadecimal,anyfont.
1.1.5Windowmanager(WM)
Completewindowmanagementincludingclipping.OverwritingofareasoutsideaWindow’sclientareaisimpossible.
Windowscanbemovedandresized.
Callbackroutinessupported(usageoptional).
WMusesminimumRAM(app.20bytesperwindow).
1.1.6OptionalwidgetsforPClookandfeel
Widgets(windowobjects,alsoknownascontrols)areavailable.TheygenerallyOperateautomaticallyandaresimpletouse.
Touch-screen&
mousesupport
Forwindowobjectssuchasthebuttonwidget,µ
C/GUIofferstouch-screenand
Mousesupport.
1.1.7PCtools
Simulationplusviewer.
Bitmapconverter.
Fontconverter
1.2HowtoconnecttheLCDtothemicrocontroller
C/GUIhandlesallaccesstotheLCD.VirtuallyanyLCDcontrollercanbesupported,independentlyofhowitisaccessed.Fordetails,pleaserefertoChapter20:
Low-LevelConfiguration"
.Also,pleasegetincontactwithusifyourLCDcontrollerisnotsupported.WearecurrentlywritingdriversforallLCDcontrollersavailableonthemarketandmayalreadyhaveaprovendriverfortheLCDcontrollerthatyouintendtouse.Itisusuallyverysimpletowritetheroutines(ormacros)usedtoaccesstheLCDinyourapplication.MIcriumoffersthecustomizationservices,ifnecessarywithyourtargethardware.
ItdoesnotreallymatterhowtheLCDisconnectedtothesystemaslongasitissomehowaccessiblebysoftware,whichmaybeaccomplishedinavarietyofways.Mostoftheseinterfacesaresupportedbyadriverwhichissuppliedinsourcecodeform.Thisdriverdoesnotnormallyrequiremodifications,butisconfiguredforyourhardwarebymakingchangesinthefileLCDConf.h.DetailsabouthowtocustomizeadrivertoyourhardwareasnecessaryareexplainedinChapter22:
LCDDrivers"
.ThemostcommonwaystoaccesstheLCDaredescribedasfollows.Ifyousimplywanttounderstandhowtouseµ
C/GUI,youmayskipthissection.
1.2.1LCDwithmemory-mappedLCDcontroller:
TheLCDcontrollerisconnecteddirectlytothedatabusofthesystem,whichmeansthecontrollercanbeaccessedjustlikeaRAM.Thisisaveryefficientwayofaccess-ingtheLCDcontrollerandismostrecommended.TheLCDaddressesaredefinedtothesegmentLCDSEG,andinordertobeabletoaccesstheLCDthelinker/locatorsimplyneedstobetoldwheretolocatethissegment.Thelocationmustbeidenticaltotheaccessaddressinphysicaladdressspace.DriversareavailableforthistypeofinterfaceandfordifferentLCDcontrollers.
1.2.2LCDwithLCDcontrollerconnectedtoport/buffer
ForslowerLCDcontrollersusedonfastprocessors,theuseofport-linesmaybetheonlysolution.ThismethodofaccessingtheLCDhasthedisadvantageofbeingsome-whatslowerthandirectbus-interfacebut,particularlywithacachethatminimizestheaccessestotheLCD,theLCDupdateisnotsloweddownsignificantly.Allthatneedstobedoneistodefineroutinesormacroswhichsetorreadthehardwareports/buffersthattheLCDisconnectedto.ThistypeofinterfaceisalsosupportedbydifferentdriversforthedifferentLCDcontrollers.
1.2.3Proprietarysolutions:
LCDwithoutLCDcontroller
TheLCDcanalsobeconnectedwithoutanLCDcontroller.Inthiscase,theLCDdataisusuallysupplieddirectlybythecontrollerviaa4-or8-bitshiftregister.Thesepro-prietaryhardwaresolutionshavetheadvantageofbeinginexpensive,butthedisad-vantageofusingupmuchoftheavailablecomputationtime.DependingontheCPU,thiscanbeanythingbetween20andalmost100percent;
withslowerCPUs,itisreallynotpossibleatall.ThistypeofinterfacedoesnotrequireaspecificLCDdriverbecauseµ
C/GUIsimplyplacesallthedisplaydataintotheLCDcache.Youmustwritethehardware-dependentportionthatperiodicallytransfersthedatainthecachememorytoyourLCD.Samplecodefortransferringthevideoimageintothedisplayisavailableinboth"
andoptimizedassemblerforM16CandM16C/80.
1.3Configuringµ
TheConfigfoldershouldcontaintheconfigurationfilesmatchingyourorder.ThefileLCDConf.hnormallycontainsallthedefinitionsnecessarytoadoptµ
C/GUItoyourLCD,whichisthemaintaskwhenconfiguringµ
C/GUI.Fordetails,pleaseseeChapter20:
Ifµ
C/GUIisnotconfiguredcorrectly,becauseyoudidnotselecttherightdisplayres-olutionorchosethewrongLCDcontroller,itwillprobablynotdisplayanythingatallordisplaysomethingthatdoesnotresemblewhatyouexpected.Sotakecaretotai-lorLCDConf.htoyourneeds.Ifyoudonotwishtodealwiththisprocess,Micriµ
mcandoitforyou,aswellastestµ
C/GUIinyourapplicationwithyourhardwareandyourLCD.
Typesofconfigurationmacros
Thefollowingtypesofconfigurationmacrosexist:
1.3.1Binaryswitches"
B"
Switchescanhaveavalueofeither0or1,where0meansdeactivatedand1meansactivated(actuallyanythingotherthan0wouldwork,butusing1makesiteasiertoreadaconfigfile).Theseswitchescanenableordisableacertainfunctionalityorbehavior.Switchesarethesimplestformofconfigurationmacro.
1.3.2Numericalvalues"
N"
Numericalvaluesareusedsomewhereinthecodeinplaceofanumericalconstant.TypicalexamplesareintheconfigurationoftheresolutionofanLCD.
1.3.3Selectionswitches"
S"
Selectionswitchesareusedtoselectoneoutofmultipleoptionswhereonlyoneofthoseoptionscanbeselected.AtypicalexamplemightbetheselectionofthetypeofLCDcontrollerused,wherethenumberselecteddenoteswhichsourcecode(inwhichLCDdriver)isusedtogenerateobjectcode.
1.3.4Alias"
A"
Amacrowhichoperateslikeasimpletextsubstitute.AnexamplewouldbethedefineU8,inwhichthepreprocessorwouldreplacewithunsignedchar.
1.3.5Functionreplacements"
F"
Macroscanbasicallybetreatedlikeregularfunctionsalthoughcertainlimitationsapply,asamacroisstillputintothecodeassimpletextreplacement.Functionreplacementsaremainlyusedtoaddspecificfunctionalitytoamodule(suchastheaccesstoanLCD)whichishighlyhardware-dependent.Thistypeofmacroisalwaysdeclaredusingbrackets(andoptionalparameters).µ
1.4Initializingµ
TheroutineGUI_Init()initializestheLCDandtheinternaldatastructuresofµ
C/GUI,andmustbecalledbeforeanyotherµ
C/GUIfunction.Thisisdonebyplacingthefollowinglineintotheinitsequenceofyourprogram:
GUI_Init();
Ifthiscallisleftout,theentiregraphicssystemwillnotbeinitializedandwillthere-forenotbeready.
1.5Usingµ
C/GUIwithtargethardware
Thefollowingisjustabasicoutlineofthegeneralstepsthatshouldbetakenwhenstartingtoprogramwithµ
C/GU
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 外文 翻译 格式 参考
![提示](https://static.bdocx.com/images/bang_tan.gif)