-
Notifications
You must be signed in to change notification settings - Fork 0
/
soarIO.h
132 lines (120 loc) · 4.49 KB
/
soarIO.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#ifndef SOARIO_H
#define SOARIO_H
#define SIO __attribute__ ((section ("sio")))
#define SSMS __attribute__ ((section ("ssms")))
/*****************************************************************************
* defines
*****************************************************************************/
#define SERIAL_TIMEOUT_DEFAULT (5 * sysTicksPerSecond)
// Flow Control Defines
#define NOFLOW 0
#define RTS 1
#define XON 2
#define FLOWBOTH 3
#define USESER 0
#define USEMEMO 1
#define USEIR 2
#define USEVFS 3
#define USEDOC 4
#define USEBT 5
#define USEIQUE 6
#define USEUSB 7
#define USEIQUESER 8
#define USECF 9
#define USEST 10
#define USEEXT 11
#define IOINIT 0
#define IOWRITE 1
#define IOREAD 2
#define IOCLOSE 3
#define IOOPEN 4
#define IOOPENTRUNC 5
#define IODIR 6
#define IOEXIST 7
#define IODELETE 8
#define NO_FILE_TYPE 0
#define WAYPOINTS_DAT 1
#define WAYPOINTS_CUP 2
#define WAYPOINTS_WPL 3
#define TASKS_SPT 4
#define POLARS_SPL 5
#define CONFIG_SCG 6
#define SUADATA_TNP 7
#define SUADATA_OPENAIR 8
#define WAYPOINTS_OZI 9
#define IGC_FILE 10
#define XFRXFR 0
#define XFRRECEIVE 1
#define XFRTRANSMIT 2
#define XFRDELETE 3
#define XFRRECONNECT 4
#define XFRC302 5
#define XFRGPSNAV 6
#define IO_NONE 0
#define IO_RECEIVE 1
#define IO_TRANSMIT 2
#define FILEFREE 9999
#define FILENAMESIZE 64
#define errSettingSerial "Error while trying to set serial port values"
/*****************************************************************************
* prototypes
*****************************************************************************/
void ClearSerial() SIO;
Boolean RxData(Int8 xfertype) SIO;
Boolean RxDataOld(void) SIO;
Boolean RxDataNew(void) SIO;
Boolean RxDataMemo(void) SIO;
Boolean RxDataVFS(void) SIO;
Boolean RxDataDOC(void) SIO;
Boolean XferInit(Char *baudrate, UInt16 flowctrl, Int8 xfertype) SIO;
Boolean XferInitOld(UInt32 baudrate, UInt16 flowctrl) SIO;
Boolean XferInitNew(UInt32 baudrate, UInt16 flowctrl, Int8 xfertype) SIO;
Boolean XferInitAlt(UInt32 baudrate, UInt16 flowctrl, Int8 xfertype) SIO;
Boolean XferInitMemo(Char *fileName, UInt32 inittype) SIO;
Boolean XferInitVFS(Char *fileName, UInt32 inittype) SIO;
Boolean XferInitDOC(Char *fileName, UInt32 inittype) SIO;
void XferClose(Int8 xfertype) SIO;
void XferCloseOld(void) SIO;
void XferCloseNew(void) SIO;
void XferCloseAlt(void) SIO;
void XferCloseMemo(void) SIO;
void XferCloseVFS(void) SIO;
void XferCloseDOC(void) SIO;
Boolean TxData(char *data, Int8 xfertype) SIO;
Boolean TxDataOld(char *data) SIO;
Boolean TxDataNew(Char *data) SIO;
Boolean TxDataAlt(Char *data) SIO;
Boolean TxDataMemo(Char *data) SIO;
Boolean TxDataVFS(Char *data) SIO;
Boolean TxDataDOC(Char *data) SIO;
void ShowSerialError(void) SIO;
Boolean OpenPortNew (UInt32 baudrate, Int8 xfertype) SIO;
Boolean VFSFileCopy(Char *oldpath, Char *newpath) SIO;
Boolean HandleVFSData(Int8 cmd, Char *data, UInt32 *numBytes) SIO;
Boolean FindVolRefNum(UInt16 *volRefNum) SIO;
Err CardMountHandler(SysNotifyParamType *notifyParamsP) SIO;
Err CardUnMountHandler(SysNotifyParamType *notifyParamsP) SIO;
Boolean WaitFor(Char *prompt, Int8 xfertype) SIO;
Boolean WaitForC(Char prompt, Int8 xfertype) SIO;
Boolean GetDataEOL(Char *buf, Int8 xfertype) SIO;
Boolean GetData(Char *buf, UInt32 datalen, Int8 xfertype) SIO;
Boolean GetDataOld(Char *buf, UInt32 datalen) SIO;
Boolean GetDataNew(Char *buf, UInt32 datalen) SIO;
Err SrmReceiveWaitNew(UInt16 portId, UInt32 bytes, Int32 timeout, UInt32* numBytesPending) SIO;
Err SerReceiveWaitNew(UInt16 portId, UInt32 bytes, Int32 timeout, UInt32* numBytesPending) SIO;
Boolean serial_out(UInt8 data) SIO;
Boolean serial_in(UInt8 *data) SIO;
Boolean USBEnabledDevice() SIO;
void SetDefaultFilename(Int8 filetype, Boolean withextention) SIO;
Boolean form_list_files_event_handler(EventPtr event) SIO;
Boolean SetSelectedFile(Int16 lstselection) SIO;
void refresh_files_list(Int16 scr) SIO;
Err SendSMS(Int8 msgtype) SSMS;
Boolean TreoDevice() SSMS;
Err LoadPhoneLibrary(Boolean unloadlib) SSMS;
Err TreoSendSMS(MemPtr address, Int8 outtype, Int8 msgtype) SSMS;
Boolean SMSGetMessage(Char *message, Int8 outtype, Int8 msgtype) SSMS;
Err PrvSmsExgLibOpen(Boolean unloadlib) SSMS;
Err PrvSmsExgOpenCom(ExgSocketType* socket, UInt32 count, UInt16 *refNumP) SSMS;
Err ExgSendSMS(MemPtr address, Int8 outtype, Int8 msgtype) SSMS;
#endif