00001
00014 #ifndef _SISOCLSER
00015 #define _SISOCLSER
00016
00017 #define CL_OK 0
00018 #define CL_ERR_NO_ERR 0
00019 #define CL_ERR_BUFFER_TOO_SMALL -10001
00020 #define CL_ERR_MANU_DOES_NOT_EXIST -10002
00021 #define CL_ERR_PORT_IN_USE -10003
00022 #define CL_ERR_TIMEOUT -10004
00023 #define CL_ERR_INVALID_INDEX -10005
00024 #define CL_ERR_INVALID_REFERENCE -10006
00025 #define CL_ERR_ERROR_NOT_FOUND -10007
00026 #define CL_ERR_BAUD_RATE_NOT_SUPPORTED -10008
00027 #define CL_ERR_OUT_OF_MEMORY -10009
00028 #define CL_ERR_INVALID_ARG -10097
00029 #define CL_ERR_UNABLE_TO_LOAD_DLL -10098
00030 #define CL_ERR_FUNCTION_NOT_FOUND -10099
00032 #define CL_BAUDRATE_9600 1
00033 #define CL_BAUDRATE_19200 2
00034 #define CL_BAUDRATE_38400 4
00035 #define CL_BAUDRATE_57600 8
00036 #define CL_BAUDRATE_115200 16
00037 #define CL_BAUDRATE_230400 32
00038 #define CL_BAUDRATE_460800 64
00039 #define CL_BAUDRATE_921600 128
00040
00041 #define CL_DLL_VERSION_NO_VERSION 1
00042 #define CL_DLL_VERSION_1_0 2
00043 #define CL_DLL_VERSION_1_1 3
00045 #define SISO_CL_EXT_PORT_FEATURE_CONFIG 1
00046 #define SISO_CL_EXT_PORT_CONFIG_INVERT_TX 0x0001
00047 #define SISO_CL_EXT_PORT_CONFIG_INVERT_RX 0x0002
00048 #define SISO_CL_EXT_PORT_CONFIG_PARITY_ON 0x0004
00049 #define SISO_CL_EXT_PORT_CONFIG_LOOPBACK_MODE 0x0008
00050 #define SISO_CL_EXT_PORT_CONFIG_SETUP_TX_RISING_EDGE 0x0010
00051 #define SISO_CL_EXT_PORT_CONFIG_SAMPLE_RX_FALLING_EDGE 0x0020
00053 #define SISO_CL_EXT_PORT_FEATURE_FIFO_DEPTH 2
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058
00075 int clSerialInit(unsigned int serialIndex, void **serialRefPtr);
00076
00096 int clSerialRead(void *serialRef, char *buffer, unsigned int *numBytes, unsigned int serialTimeout);
00097
00118 int clSerialWrite(void *serialRef, char *buffer, unsigned int *bufferSize, unsigned int serialTimeout);
00119
00128 void clSerialClose(void *serialRef);
00129
00147 int clGetManufacturerInfo(char *manufacturerName, unsigned int *bufferSize, unsigned int *version);
00148
00156 int clGetNumSerialPorts(unsigned int *numSerialPorts);
00157
00191 int clGetSerialPortIdentifier(unsigned int serialIndex,char* portID,unsigned int* bufferSize);
00192
00203 int clGetNumBytesAvail(void *serialRef, unsigned int *numBytes);
00204
00211 int clFlushPort(void* serialRef);
00212
00225 int clGetSupportedBaudRates(void *serialRef, unsigned int *baudRates);
00226
00243 int clSetBaudRate(void *serialRef, unsigned int baudRate);
00244
00257 int clSetParity(void *serialRef, unsigned int parityOn);
00258
00259
00277 int clSetPortFeature(void *serialRef, unsigned int feature, unsigned int value);
00278
00279
00300 int clSetFlowControlMode(void *serialRef, void *secondRef, unsigned int flowControl);
00301
00302
00319 int clGetErrorText(int errorCode,char *errorText,unsigned int* errorTextSize);
00320
00321 #ifdef __cplusplus
00322 }
00323 #endif
00324
00325 #endif