RIEVTECH STUDIO SOFTWARE MANUAL Baud Rate: the speed of communication, int type. e.g. 9600, 115200 Date bit: the number of bits used as data, int type, 7,8 Stop bit: the stop bit, int type, 1,2 Check bit: specify the way of checking, int type, 'n' or 110-no check, 'o' or 111-odd check, 'e' or 101-even check Communication mode: set the mode of communication, int type, 0-232, 1-485-4w, 2-485-2w. Return Value: 0-Failed, 1-Success. Example : int error=SetComParam(0,115200,8,1,'n',2);//COM1,485-2w, 115200,8,1,N. 6.2.2.5 Com Data Output: Outport intOutport( Port ID,BufferPointer,Data Quantity); Please call the SetComParam function to initialize the serial port before call this function.
Port ID:the ID of com port, unsigned int type. 0-COM1, 1-COM2, 2-COM3... Buffer Pointer: the pointer to the buffer array. Data Quantity: unsigned short, the number of data to be sent out. Return Value: the number of bytes of the output data. Example : unsigned char send_buff[]="Hello world!"; int error=Outport(1,send_buff,12); 6.2.2.6 Com Data Import: Inport intInport( Port ID,BufferPointer,BufferSize,Timeout Limit): Please call the SetComParam function to initialize the serial port before call this function. Port ID:the ID of com port, unsigned int type. 0-COM1, 1-COM2, 2-COM3... 587