/*******************************************************/ /* */ /* Library for I-7188XA. */ /* */ /*******************************************************/ Important notice: (A) must call InitLib(); first. Ver 2.12 [2012/09/17] 1.Fixed: Fix bug for COM3/COM4. Setting the data bit of data format to 7. If the transmit data is more than 127, the transmit data will be incorrect. Ver 2.10 [2012/3/14] 1.Fixed: Fix bug for an undefined symbol IntNull_0. Define the IntNull_0. [2010/09/08] 1.Enhanced: Adjust the optimization of BC++ 3.1 and re-compiler the library. 2.Modified: ToComBufn_x(). [2010/08/25] 1.Enhanced: For com port ISR. ==> Add _asm cld; [2010/08/03] 1.Added: Support OS7_COM.lib Ver 1.1.0 Ver 2.09 [2010/06/14] 1.Added: Support new data format 8N2/8M1/8S1 for COM3/COM4. Ver 2.08 [2008/01/09] 1.Fixed: Fix bug for ToComBufn()/ToComStr()/printCom. Ver 2.07 [2008/01/09] 1.Enhanced: Enhance EE_WiteProtect() Ver 2.06 [2007/09/20] 1.Added: Add a code about LSR error. [2007/09/05] 1.Modified: Change the type of trigger of interrupt of X-board to level trigger. [2007/07/24] 1.Fixed: Modify the return value of ToComBufn() to represent the byte number of the data sent. Ver 2.05 [2007/07/06] 1.Added:Add three functions unsigned GetOsLibVersion(void); char *GetOsLibDate(void); char *GetOsLibName(void); Ver 2.04 1.AAdded: Add some COM port functions about MSR/trigger level/MCR... Ver 2.03 1.Fixed: Fix bug for the data loss problem of COM1/COM2 by using Com port DMA functions. Ver 2.01 [2005/05/27] 1.Added: Add two functions: int SetDelayTimer(int no); int SetUserTimer(int no); for seting the timer used by the delay functions: Delay()/Delay_1()/Delay_2() & InstallUserTimerFunction_us()/InstallUserTimerFunction_ms(). By defualt all these functions will use timer 0, Now it can be set to use timer 1. [2005/03/22] 1. Modified:InitLib() will not call the function "setvbuf(stdout,NULL,_IONBF,0);" Because it is compatible with MSC/MSVC++. So user want to use "printf()" with TC/BC++ must add "setvbuf(stdout,NULL,_IONBF,0);" in his program. [2005/02/21] 1. Added: Add the function AllocateTopMemory(). 2. Added: Add the variables LsrError_1,LsrError_2,LsrError_5,LsrError_6,LsrError_7. [2004/10/13] 1. Add the function GetSerialNumber(). [2004/09/09] 1.Added:Add "setvbuf(stdout,NULL,_IONBF,0);" to the function InitLib(). Then user's program can call printf()/puts() & work well. (The OS need update to the date 2004/09/09 or later. Old version also will work, but will lost the last byte it print out. ) 2.Added: Add a variable "bLfMode" for Putch()/Puts()/Print(). when bLfMode is set to 1, these functions will translate '\n' to '\r'+'\n'. The default value of bLfMode is set to 0. [2004/09/07] 1.Modified:make a new version named 7188xa.lib (without 'L') remove the objs come from BC++ 3.1 library. [2004/07/05] 1.Fixed: fix bug for ReadComn_1()/ReadComn_2()/ReadComn_5()/ReadComn_6()/ReadComn_7() ================================================================================ [Chinese Big5]------------------------------------------------------------------ == [改版說明] ================================================================== Ver 2.12 [2012/09/17] 1. 修正COM3/COM4的bug. 設定data bit為7,當要傳送的字元是大於127時,傳送的資料會是錯的。 Ver 2.10 [2012/3/14] 1.修正IntNull_0沒有被定義的bug. [2010/09/08] 1.調整BC++3.1的最佳化設定和重新編譯library. 2.改善ToComBufn_x()函數. [2010/08/25] 1.在com port ISR的程式碼中加入_asm cld. [2010/08/03] 1.支援OS7_COM.lib Ver 1.1.0 Ver 2.09 [2010/06/14] 1.COM3/COM4支援新的data format 8N2/8M1/8S1. Ver 2.08 [2008/01/09] 1.修正ToComBufn()/ToComStr()/printCom的bug Ver 2.07 [2008/01/09] 1.改善EE_WiteProtect() Ver 2.06 [2007/09/20] 1.修改LSR error的程式碼. [2007/09/05] 1.X-board 的UART中斷改用level trigger. [2007/07/24] 1.ToComBufn()的return值修正為送出data的byte 數 Ver 2.05 [2007/07/06] 1.增加三個函數 unsigned GetOsLibVersion(void); char *GetOsLibDate(void); char *GetOsLibName(void); Ver 2.04 1.加上一些 com port 的副程式(跟 MSR/trigger level/MCR... 等有關)。 Ver 2.03 1.修正 COM1/2 使用 DMA 可能會掉 data 的問題。 Ver 2.01 [2005/05/27] 1.增加二個函數: int SetDelayTimer(int no); int SetUserTimer(int no); [2005/02/21] 1. 增加AllocateTopMemory()函數. 2. 增加變數LsrError_1,LsrError_2,LsrError_5,LsrError_6,LsrError_7. [2004/10/13] 1. 增加GetSerialNumber()函數. [2004/09/09] 1.增加一個變數"bLfMode",會影響Putch()/Puts()/Print(). 當設定bLfMode為1, Putch()/Puts()/Print()會在傳送'\n'時,變成傳送'\r'+'\n'. 預設bLfMode是設為0. [2004/09/07] 1.定義新的library名字,將名字取為7188xa.lib (不再有字母'L') [2004/07/05] 1.修正ReadComn_1()/ReadComn_2()/ReadComn_5()/ReadComn_6()/ReadComn_7()的bug