espusb.h

来自「NewPort多轴平控制器控制(USB COMM)」· C头文件 代码 · 共 63 行

H
63
字号
// Module:		ESPDLL.h
// Description:	Header file for USB interface DLL
//				ESP7000 and ESP300
// Author:		ISTD Motion Electronics -- WB
// Notice:		Copyright (C)2000 Newport Corp.
// Revisions:	03-01-00 -- WB -- Initial Coding
//				04-12-00 -- WB -- Adapted for Multi USB targets on one bus
//				04-27-00 -- WB -- Added error return status


// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the ESPUSB_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// ESPUSB_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.

#ifndef __espdll_h__
#define __espdll_h__

#define ESPOK	0
#define ESPERROR -1

#define ESPUSBDUPLICATEADDRESS -2	//More than one on the bus with the same address
#define ESPUSBADDRESSNOTFOUND -3	//The requested valid address was not found on the bus
#define ESPUSBINVALIDADDRESS -4		//address > 31 or address < 0



#ifdef __cplusplus
extern "C"
{
#undef  EXPORT
#define EXPORT _stdcall
#else
#define EXPORT EXTERN_C _stdcall
#endif 



long EXPORT esp_usb_send_ascii(long DeviceID, 
							   char * Command, 
							   unsigned long Length);

long EXPORT esp_usb_get_ascii(long DeviceID, 
							  char * Buffer, 
							  unsigned long Length, 
							  unsigned long *BytesRead);

long EXPORT esp_usb_get_daq_data(long DeviceID, 
								 char * Buffer, 
								 unsigned long Length, 
								 unsigned long * BytesRead);

long EXPORT esp_usb_init_system(void);


#ifdef __cplusplus
}
#endif

#endif //#ifndef __espdll_h__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?