dataXfer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __DATA_XFER_H__
00031 #define __DATA_XFER_H__
00032
00037 #include "dataXferImpl.h"
00038
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00046 #define RECEIVE_TIMEOUT (FCY * 1/20 * 0.1)
00047
00050 void xferOutChar(char c);
00051
00052
00054 #ifndef OUT_CHAR
00055 #ifdef __PIC__
00056 void outChar(uint8 c);
00057 #define OUT_CHAR(c) outChar(c);
00058 #else
00059 void outChar(uint8 c);
00060 #define OUT_CHAR(c) outChar(c);
00061 #endif
00062 #else
00063
00064
00065 #undef OUT_CHAR
00066 void testOutChar(uint8 c);
00067 #define OUT_CHAR(c) testOutChar(c)
00068 #endif
00069
00072 void initDataXfer();
00073
00088 void specifyVar(uint u_varIndex, void* pv_data, uint u_size,
00089 BOOL b_isWriteable, char* psz_format, char* psz_name,
00090 char* psz_desc);
00091
00104 #define SPECIFY_VAR(u_varIndex, data, isWriteable, format, desc) \
00105 specifyVar(u_varIndex, &data, sizeof(data), isWriteable, format, #data, desc)
00106
00110 void sendVar(uint u_varIndex);
00111
00112 #if !defined(__PIC__) || defined(__DOXYGEN__)
00113
00124 int formatVar(uint u_varIndex, char* psz_buf);
00125 #endif
00126
00127
00128 #if defined(__PIC__) || defined(__DOXYGEN__)
00129
00136 uint receiveVar(char* c);
00137
00145 char inCharXfer();
00146 #endif
00147
00148
00149 #ifdef __cplusplus
00150 }
00151 #endif
00152
00153 #endif