

//#ifdef __cplusplus    // If used by C++ code, 
//extern "C" {          // we need to export the C interface
//#endif

/*
	Initialize Uart
	
	param:
		port  :	 port number	
				
	Return value:
		unsigned int :			return UART handle
*/
HANDLE mxsp_open();

/*
	Get UART Mode
	
	param:
		(in)int index :	Port index (0,1)		
				
	Return value:
		int:		0 : RS232 Mode
					1 : RS485-2W Mode
					2 : RS422 Mode
					3 : RS485-4W Mode
*/
int mxsp_get_interface(HANDLE fd, int port_index);

/*
	Set UART Mode
	
	param:
		(in)int index  :	Port index		
		(in)int mode   :	Port mode		
				
	Return value:
		int:			Current Mode. 
*/
int mxsp_set_interface(HANDLE fd, int port_index, int port_interface);

/*
	close UART	
	param:
		(in)unsigned int fd  :	Handle of the open port		
				
	Return value:
		none
*/
void mxsp_close();

//#ifdef __cplusplus    // If used by C++ code, 
//}
//#endif
