From fd6bb20116127f6ac903d4b03abac72a49baa1ae Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Sat, 27 Apr 2019 22:20:21 +0100 Subject: fish --- doc/datalink.ps | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/usage | 115 ++++++++++++++++++++++++++++ 2 files changed, 343 insertions(+) create mode 100644 doc/datalink.ps create mode 100644 doc/usage (limited to 'doc') diff --git a/doc/datalink.ps b/doc/datalink.ps new file mode 100644 index 0000000..91c9798 --- /dev/null +++ b/doc/datalink.ps @@ -0,0 +1,228 @@ +%!PS-Adobe-2.0 +%%Title: datalink.fig +%%Creator: fig2dev Version 3.1 Patchlevel 1 +%%CreationDate: Sat Oct 12 15:13:51 1996 +%%For: protius@keman (Tommy Johnson,Ivers 226,4192,4192) +%%Orientation: Portrait +%%BoundingBox: 47 168 565 623 +%%Pages: 1 +%%BeginSetup +%%IncludeFeature: *PageSize Letter +%%EndSetup +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {} def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +-79.0 661.5 translate +1 -1 scale + +/clp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/l {lineto} bind def +/m {moveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def + /DrawEllipse { + /endangle exch def + /startangle exch def + /yrad exch def + /xrad exch def + /y exch def + /x exch def + /savematrix mtrx currentmatrix def + x y tr xrad yrad sc 0 0 1 startangle endangle arc + closepath + savematrix setmatrix + } def + +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +/Times-Roman findfont 180.00 scalefont setfont +2325 8175 m +gs 1 -1 sc (Drawn with XFig 3.1 patch level 4. ) col-1 show gr +7.500 slw +% Polyline +n 2850 1650 m 3900 1650 l gs col-1 s gr +% Polyline +n 2850 2100 m 3900 2100 l gs col-1 s gr +% Polyline +n 2850 2550 m 3900 2550 l gs col-1 s gr +% Polyline +n 3900 1650 m 3900 2550 l gs col-1 s gr +% Polyline +n 3900 1650 m 4950 1650 l 4950 2625 l gs col-1 s gr +% Polyline +n 4800 2625 m 5100 2625 l gs col-1 s gr +% Polyline +n 4800 2625 m 4950 2850 l 5100 2625 l gs col-1 s gr +% Polyline +n 4800 2850 m 5100 2850 l gs col-1 s gr +% Polyline +n 4950 2850 m 4950 3375 l 4725 3600 l gs col-1 s gr +% Polyline +n 4725 3750 m 4950 3975 l gs col-1 s gr +% Polyline +n 4725 3450 m 4725 3525 l 4725 3900 l gs col-1 s gr +% Polyline +n 4725 3675 m 3975 3675 l gs col-1 s gr +% Polyline +n 3975 3675 m 3900 3600 l 3825 3750 l 3750 3600 l 3675 3750 l 3600 3600 l + 3525 3750 l 3450 3675 l gs col-1 s gr +% Polyline +n 3450 3675 m 2925 3675 l gs col-1 s gr +% Polyline +n 4275 3675 m 4275 4125 l gs col-1 s gr +% Polyline +n 4125 4125 m 4425 4125 l gs col-1 s gr +% Polyline +n 4125 4200 m 4425 4200 l gs col-1 s gr +% Polyline +n 4275 4200 m 4275 4500 l 4950 4500 l gs col-1 s gr +% Polyline +n 4950 3975 m 4950 4950 l 2925 4950 l gs col-1 s gr +% Polyline +n 4875 3900 m 4800 3900 l gs col-1 s gr +% Polyline +n 4875 3900 m 4875 3825 l gs col-1 s gr +/Times-Roman findfont 180.00 scalefont setfont +2400 1725 m +gs 1 -1 sc (DSR) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 2175 m +gs 1 -1 sc (CD) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 2625 m +gs 1 -1 sc (DTR) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 3750 m +gs 1 -1 sc (TD) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 5025 m +gs 1 -1 sc (GND) col-1 show gr +/Times-Roman findfont 150.00 scalefont setfont +3600 3525 m +gs 1 -1 sc (10K) col-1 show gr +/Times-Roman findfont 150.00 scalefont setfont +3825 4275 m +gs 1 -1 sc (1uf) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 6225 m +gs 1 -1 sc (The data is transmitted at 115200 bps, well above the) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 6450 m +gs 1 -1 sc (Timex baud rate, to allow the rather odd word format to) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 6675 m +gs 1 -1 sc (be generated. However the start bits of the 115200) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 6900 m +gs 1 -1 sc (data are still present, and confuse the watch. So the) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 7125 m +gs 1 -1 sc (resistor and capacitor filter out the start bits, which) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 7350 m +gs 1 -1 sc (are much shorter than the real data bits.) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 5775 m +gs 1 -1 sc (Theory: ) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +2400 6000 m +gs 1 -1 sc (Tie DSR, CD, DTR togather to form a null-modem.) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 4425 m +gs 1 -1 sc (Timex and Datalink are registered trademarks) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 4650 m +gs 1 -1 sc (of the Timex Corp.) col-1 show gr +/Times-Roman findfont 150.00 scalefont setfont +5175 2850 m +gs 1 -1 sc (LED) col-1 show gr +/Times-Roman findfont 360.00 scalefont setfont +2100 900 m +gs 1 -1 sc (Extra Cheesy Timex Datalink) col-1 show gr +/Times-Roman findfont 360.00 scalefont setfont +2700 1320 m +gs 1 -1 sc (Serial Port Interface) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 2025 m +gs 1 -1 sc (Developed by Tommy Johnson) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 2250 m +gs 1 -1 sc (See http://csgrad.cs.vt.edu/~tjohnson/ for more) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 2475 m +gs 1 -1 sc (info.) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 2850 m +gs 1 -1 sc (I am not affiliated with Timex. This was developed) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 3075 m +gs 1 -1 sc (without support from Timex. They DO NOT support) col-1 show gr +/Times-Roman findfont 180.00 scalefont setfont +6675 3300 m +gs 1 -1 sc (it, DO NOT ask them questions about it.) col-1 show gr +% Ellipse +n 4725 3675 300 300 0 360 DrawEllipse gs col-1 s gr + +showpage +%%Page: 1 1 +$F2psEnd +restore diff --git a/doc/usage b/doc/usage new file mode 100644 index 0000000..5c60df9 --- /dev/null +++ b/doc/usage @@ -0,0 +1,115 @@ +#include + +WatchInfoPtr dl_init_watch(int which_watch); + + which_watch is currently only DATALINK_150; + + returns a pointer to a new WatchInfo pointer, NULL on error. If there + is an error, dl_error_proc will also be called. dl_error_proc can be + set with dl_set_error + +ItemPtr dl_new_item(WatchInfoPtr wi, int type); + + wi is the WatchInfoPtr returned by dl_init_watch. + type can be one of + DL_TIME_TYPE for time packet + DL_ALARM_TYPE for alarm packet + DL_APP_TYPE for appointment packet + DL_PHONE_TYPE for phone packet + DL_TODO_TYPE for todo packet + DL_ANNIV_TYPE for anniversary packet + DL_SYSTEM_TYPE for system packet + DL_WRISTAPP_TYPE for wristapp packet + DL_MELODY_TYPE for melody packet + + dl_new_item allocate an item structure and initializes it with the item + type supplied. + + returns a pointer to a new item, NULL on error. If there is an error, + dl_error_proc will also be called. dl_error_proc can be set with + dl_set_error + +int dl_init_download(WatchInfoPtr wi, List times, List alarms, + List apps, List phones, List todos, List annivs, + List system, List wristapp, List melody); + + wi is the WatchInfoPtr returned by dl_init_watch. times is the list + of times to download. alarams is the list of alarms to download, apps + is the list of appointments to download, phones is the list of phone + numbers to download, todos is the list of todo items to download, + annivs is the list of anniversaries to download, system is the list of + system data to download, wristapp is the list of wristapps to download + and melody is the list of melodies to download. Currently, system, + wristapp and melody can only be a list of 1 item. + + dl_init_download will check the validity of the data being + downloaded to the watch. If everything is ready for the download, + dl_init_download will copy all of the data in preparation for a call + to dl_send_data. + + If there are any problems with the data, depending on the severity, + dl_error_proc or dl_warn_proc will be called and the value of that + call will be retuned from dl_init_download. + +int dl_send_data(int device); + + device is the type of output device to use in the download to + (SVGA_BLINK, SER_BLINK, PACKET_FILE). + + dl_send_data will send the data prepared by dl_init_download using the + the selected blink engine. On error dl_error_proc is called and its + return value is returned. + +int dl_sizeof_item(ItemPtr item); + + item is the item that you want to get a size of. The size is how + much of the database space in the watch that will be taken up by the + item. For Time, Alarm, System, WristApp, and Melody packets, the size + is 0. + +int dl_sizeof_list(List list); + + list is a list of item that you want to get a size of. The size is how + much of the database space in the watch that will be taken up by the + item. For Time, Alarm, System, WristApp, and Melody packets, the size + is 0. + +int dl_item_ok(WatchInfoPtr wi, ItemPtr item); + + wi is the WatchInfoPtr returned by dl_init_watch. times is the list + item is the item returned from dl_new_item that has had the data + portion filled by the calling application. + + returns 1 if the item is OK, 0 otherwise. + +void dl_free_download() + + free up space allocated for a download by dl_init_download. + +WatchInfoPtr dl_read_save(char *file, ListPtr *alarms, ListPtr *apps, + ListPtr *phones, ListPtr *todos, ListPtr *annivs, ListPtr *system, + ListPtr *wristapp, ListPtr *melody); + + Initialize a watch structure with the contects of file. Return a watch + info structure and the lists. + +int dl_write_save(char *file, char *wristappfile, char *melodyfile); + + Save the contents of a download to a reloadable file. dl_write_save + must be called after dl_init_download. file is the file to write the + save to. wristappfile is the file that the selected wristapp can be + read from. melodyfile is the file that the selected melody scheme can + be read from. + +int dl_pack_ascii(char *to, char *from); + + Pack the characters in from into to using the watch character set. + +void dl_pack_fill_ascii(char *to, char *from, int size, char fill); + + Pack the characters in from into to using the watch character + set. This is packed one character perl byte (unlike dl_pack_ascii). + +char dl_pack_char(char c); + + Convert c into the watch characters set. -- cgit v1.2.3