00001
00006 #ifndef I_D48432D9_1FA3_4C7D_B44C_05F8B9000ADF
00007 #define I_D48432D9_1FA3_4C7D_B44C_05F8B9000ADF
00008
00009
00010 #if BUILDING_GCLIB && HAVE_VISIBILITY
00011 #define GCLIB_DLL_EXPORTED __attribute__((__visibility__("default")))
00012 #elif BUILDING_GCLIB && defined _MSC_VER
00013 #define GCLIB_DLL_EXPORTED __declspec(dllexport)
00014 #elif defined _MSC_VER
00015 #define GCLIB_DLL_EXPORTED __declspec(dllimport)
00016 #else
00017 #define GCLIB_DLL_EXPORTED
00018 #endif
00019
00020 #include "gclib_record.h"
00021 #include "gclib_errors.h"
00022
00023 #ifdef _WIN32
00024 #define GCALL __stdcall
00025 #else
00026 #define GCALL
00027 #endif
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032
00033
00034 #define G_DR 1
00035 #define G_QR 0
00036 #define G_BOUNDS -1
00037 #define G_CR 0
00038 #define G_COMMA 1
00039
00040
00041 #define G_UTIL_TIMEOUT 1
00042 #define G_UTIL_TIMEOUT_OVERRIDE 2
00043 #define G_USE_INITIAL_TIMEOUT -1
00044 #define G_UTIL_VERSION 128
00045 #define G_UTIL_INFO 129
00046 #define G_UTIL_SLEEP 130
00047 #define G_UTIL_ADDRESSES 131
00048 #define G_UTIL_IPREQUEST 132
00049 #define G_UTIL_ASSIGN 133
00050
00051
00052 #define G_HUGE_BUFFER 524288
00053
00054 typedef int GReturn;
00055 typedef void* GCon;
00056 typedef unsigned int GSize;
00057 typedef int GOption;
00058 typedef char* GCStringOut;
00059 typedef const char* GCStringIn;
00060 typedef char* GBufOut;
00061 typedef const char* GBufIn;
00062 typedef unsigned char GStatus;
00063 typedef void* GMemory;
00064
00066 GCLIB_DLL_EXPORTED GReturn GCALL GOpen(GCStringIn address, GCon* g);
00112
00113 GCLIB_DLL_EXPORTED GReturn GCALL GClose(GCon g);
00132
00133 GCLIB_DLL_EXPORTED GReturn GCALL GRead(GCon g, GBufOut buffer, GSize buffer_len, GSize* bytes_read);
00150
00151 GCLIB_DLL_EXPORTED GReturn GCALL GWrite(GCon g, GBufIn buffer, GSize buffer_len);
00164
00165 GCLIB_DLL_EXPORTED GReturn GCALL GCommand(GCon g, GCStringIn command, GBufOut buffer, GSize buffer_len, GSize* bytes_returned);
00179
00180 GCLIB_DLL_EXPORTED GReturn GCALL GProgramDownload(GCon g, GCStringIn program, GCStringIn preprocessor);
00228
00229 GCLIB_DLL_EXPORTED GReturn GCALL GProgramUpload(GCon g, GBufOut buffer, GSize buffer_len);
00241
00242 GCLIB_DLL_EXPORTED GReturn GCALL GArrayDownload(GCon g, const GCStringIn array_name, GOption first, GOption last, GCStringIn buffer);
00258
00259 GCLIB_DLL_EXPORTED GReturn GCALL GArrayUpload(GCon g, const GCStringIn array_name, GOption first, GOption last, GOption delim, GBufOut buffer, GSize buffer_len);
00275
00276 GCLIB_DLL_EXPORTED GReturn GCALL GRecord(GCon g, union GDataRecord* record, GOption method);
00302
00303 GCLIB_DLL_EXPORTED GReturn GCALL GMessage(GCon g, GCStringOut buffer, GSize buffer_len);
00332
00333 GCLIB_DLL_EXPORTED GReturn GCALL GInterrupt(GCon g, GStatus* status_byte);
00354
00355 GCLIB_DLL_EXPORTED GReturn GCALL GFirmwareDownload(GCon g, GCStringIn filepath);
00375
00376 GCLIB_DLL_EXPORTED GReturn GCALL GUtility(GCon g, GOption request, GMemory memory1, GMemory memory2);
00462 #ifdef __cplusplus
00463 }
00464 #endif
00465
00466 #endif //I_D48432D9_1FA3_4C7D_B44C_05F8B9000ADF