6
Target_win32_console :forwindows32OSinconsolemode
Target_win32_gui:forwindows32OSguimode
Target_wince:forWindowsCEOS
Listofthetarget_xxx.cfunctions
DWORDtarget_gettimeinms(void)
MustreturnaDWORDwhichisa32bitstimecounterinms.Thestartingvaluedoesnotmatter,the
important is
that the returned value between two calls evolves regarding the number of 1/1000
secondswhichhaveelapsed.
voidtarget_readrtc(unsignedshort*ms,unsignedshort*sec,unsignedshort*min,unsignedshort
*hour,unsignedshort*day,unsignedshort*month,unsignedshort*year)
Mustreturnthecurrentdateandtimeinthe7unsignedshorts.
voidtarget_fatal(void)
Calledwhenafatalerroroccurs,byexampletheexecutionofaninvalidoperationcode.
char*target_id(void)
Mustreturna
16chars string(thele ngthmustbeexactly16chars)whichisthenameofthetarget.
ThisnamewillbedisplayedinAUTOMGENatconnectiontime.
unsignedchartarget_confbyte(void)
Mustreturnaconfigurationbyte.Actuallyonlybit1(value=2)isused.Thisbitmustbesetto0ifthe
integersarecodedwithLSBfirst,otherwisesetthisbitto1.
inttarget_com_open(unsignedport,unsigned speed,unsigned parity,unsigned databits,unsigned
stopbits)
Openaserialportforcommunications.
Portisthenumberoftheport,1=firstport,2=second,etc.
Speedisthebaudrateinbauds,
Parityisoneofthesechars:N(fornone),O(forodd),
E(foreven),
Databits:always8.
Stopbits:1or2.
Thisfunctionmustreturn0forsuccess,<0forerror.
voidtarget_com_send(unsignedchar*buff,unsignedlen)
Thisfunctionmustsendthelencharsofthebuffbufferstotheseriallink.
inttarget_com_getchar(void)
Thisfunctionmustreturnanincomingcharfromtheseriallinkor‐1ifnocharhasbeen
received.