45 #ifndef __clallserial_h__
46 #define __clallserial_h__
51 #if (defined(__cplusplus) || defined(__cplusplus__))
52 #define USER_EXTERN_C extern "C"
57 #ifdef CLALLSERIAL_EXPORTS
58 #define CLALLSERIALEXPORT USER_EXTERN_C __declspec(dllexport)
60 #define CLALLSERIALEXPORT USER_EXTERN_C __declspec(dllimport)
64 #define CLALLSERIALCC __stdcall
67 #ifndef _CL_hSerRef_DEFINED_
68 #define _CL_hSerRef_DEFINED_
72 #ifndef _CL_INT32_DEFINED_
73 #define _CL_INT32_DEFINED_
78 #ifndef _CL_UINT32_DEFINED_
79 #define _CL_UINT32_DEFINED_
83 #ifndef _CL_INT8_DEFINED_
84 #define _CL_INT8_DEFINED_
92 #define CL_DLL_VERSION_NO_VERSION 1 // Not a CL dll
93 #define CL_DLL_VERSION_1_0 2 // Oct 2000 compliant
94 #define CL_DLL_VERSION_1_1 3 // Oct 2001 compliant
100 #define CL_BAUDRATE_9600 1
101 #define CL_BAUDRATE_19200 2
102 #define CL_BAUDRATE_38400 4
103 #define CL_BAUDRATE_57600 8
104 #define CL_BAUDRATE_115200 16
105 #define CL_BAUDRATE_230400 32
106 #define CL_BAUDRATE_460800 64
107 #define CL_BAUDRATE_921600 128
113 #define CL_ERR_NO_ERR 0
114 #define CL_ERR_BUFFER_TOO_SMALL -10001
115 #define CL_ERR_MANU_DOES_NOT_EXIST -10002
116 #define CL_ERR_PORT_IN_USE -10003
117 #define CL_ERR_TIMEOUT -10004
118 #define CL_ERR_INVALID_INDEX -10005
119 #define CL_ERR_INVALID_REFERENCE -10006
120 #define CL_ERR_ERROR_NOT_FOUND -10007
121 #define CL_ERR_BAUD_RATE_NOT_SUPPORTED -10008
122 #define CL_ERR_OUT_OF_MEMORY -10009
123 #define CL_ERR_REGISTRY_KEY_NOT_FOUND -10010
124 #define CL_ERR_INVALID_PTR -10011
125 #define CL_ERR_UNABLE_TO_LOAD_DLL -10098
126 #define CL_ERR_FUNCTION_NOT_FOUND -10099
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetNumBytesAvail(hSerRef serialRef, CLUINT32 *numBytes)
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clFlushPort(hSerRef serialRef)
CLALLSERIALEXPORT void CLALLSERIALCC clSerialClose(hSerRef serialRef)
unsigned int CLUINT32
Definition: clallserial.h:80
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetNumPorts(CLUINT32 *Ports)
#define CLALLSERIALEXPORT
Definition: clallserial.h:60
#define CLALLSERIALCC
Definition: clallserial.h:64
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSerialRead(hSerRef serialRef, CLINT8 *buffer, CLUINT32 *bufferSize, CLUINT32 serialTimeout)
void * hSerRef
Definition: clallserial.h:69
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSetBaudRate(hSerRef serialRef, CLUINT32 baudRate)
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetSupportedBaudRates(hSerRef serialRef, CLUINT32 *baudRates)
int CLINT32
Definition: clallserial.h:74
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetPortInfo(CLUINT32 serialIndex, CLINT8 *manufacturerName, CLUINT32 *nameBytes, CLINT8 *portID, CLUINT32 *IDBytes, CLUINT32 *version)
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSerialWrite(hSerRef serialRef, CLINT8 *buffer, CLUINT32 *bufferSize, CLUINT32 serialTimeout)
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSerialInit(CLUINT32 serialIndex, hSerRef *serialRefPtr)
char CLINT8
Definition: clallserial.h:85
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetErrorText(const CLINT8 *manuName, CLINT32 errorCode, CLINT8 *errorText, CLUINT32 *errorTextSize)