===== FOR COM PORT =========================================================================== [1].MiniOS7 library 2.0 support Software flow control(Xon/Xoff) for COM ports(except COM2). A.To ENABLE the Software flow control please use: USE COM1 for example : InstallCom_1(baud,8,0,1); // after call InstallCom_1(), the Xon/Xoff mode is DISABLE. SetXonXoffControlMode_1(1); B. To DISABLE the Software flow control please use: USE COM1 for example : SetXonXoffControlMode_1(0); After enable Xon/Xoff control, when input buffer free size is less than INPUT_BUFFER_SIZE/4, the driver will send out Xoff(0x13). when the input buffer free size is larger than INPUT_BUFFER_SIZE/2 again ,then the driver will send out Xon(0x11). The default INPUT_BUFFER_SIZE is 1024 bytes, user's program also can set the size before call InstallCom_x(...).(Please refer to [6]) [2].How to use COM6/7/8 ? If the X-board support COM6/7/8, must call InstallCom_36()/InstallCom_47()/InstallCom_58() to install the driver(ISR) for COM36/47/58. Because COM3 & COM6 share the same interrrupt signal(INT0), COM4 & COM7 share the same interrupt signal(INT1), and COM5 & COM8 share the same interrrupt signal(INT4). So when use COM3/6 just call: InstallCom_36(baud,data,parity,stop); both COM3 & COM6 will be set to the same baud rate and data format. if these two ports use different baud rate or data format, then must call (for example COM3 use another baud rate): SetBaudrate_3(baud3); to set the baud rate for COM3. & call SetDataFormat_3(data3,parity3,stop3); to set data format. COM4/7 & COM5/8 are the same as COM3/6. To uninstall the driver(ISR), must call RestoreCom_36()/RestoreCom_47()/RestoreCom_58(). [3].If the X-board only support COM3~COM7 how to use them ? In this condition: COM3/COM6 share interrupt signal ---> call IstallCom_36(). COM4/COM7 share interrupt signal ---> call IstallCom_47(). COM5 ---> call IstallCom_5(). [4].How to detect how many COM ports on the X-board ? Just call "GetComportNumber()", it return the com port number in the system. For I-7188XB/I-7188XB/I-7188E, the system defalut with 2 com ports, so if without add any X-board, it will return 2. If on X-board add 3 COM ports, then it will return 5(2+3). (For 7188E1 it also return 2(NOT 1).) [5].COM1/2 now support 2 stop bits. The mode can be use are: 7O2,7N2,7E2. NOT support 8N2,8E2,8O2. And the Istall functions for COM1/2 now are change to: int InstallCom_1(unsigned long baud, int data, int parity,int stop); int InstallCom_2(unsigned long baud, int data, int parity,int stop); Add the parameter "stop". (The old version is: int InstallCom_1(unsigned long baud, int data, int parity); int InstallCom_1(unsigned long baud, int data, int parity); ) [6].How to set com port input/output buffer size? To set com port buffer size must call "SetComPortBufferSize_x(in_size,out_size);" before call "InstallCom_x(...);" For example: SetComPortBufferSize_1(512,256); InstallCom_1(9600,8,0,1); set the input buffer to 512 bytes and output buffer to 256 bytes. ===== FOR COM PORT ===========================================================================