Table of Contents
1. C LANGUAGE LIBRARY
1.1 CONST DEFINED IN 7188.H
1.2 FUNCTIONS BY TYPE
1.2.1 Functions for COM ports
1.2.2 Functions for LED
1.2.3 Functions for 5-Digit LED
1.2.4 Functions for data storage
1.2.5 Functions for WatchDog Timer
1.2.6 Functions for timer
1.2.7 Functions for stdio
1.2.8 MISC functions
2. 7188(D)/DOS LIBRARY REFERENCE
2.1 InstallCom
2.2 InstallCom1
2.3 InstallCom2
2.4 InstallCom3
2.5 InstallCom4
2.6 RestoreCom
2.7 RestoreCom1
2.8 RestoreCom2
2.9 RestoreCom3
2.10 RestoreCom4
2.11 IsCom
2.12 IsCom1
2.13 IsCom2
2.14 IsCom3
2.15 IsCom4
2.16 ReadCom
2.17 ReadCom1
2.18 ReadCom2
2.19 ReadCom3
2.20 ReadCom4
2.21 ToCom
2.22 ToCom1
2.23 ToCom2
2.24 ToCom3
2.25 ToCom4
2.26 ToComBufn
2.27 ToCom1Bufn
2.28 ToCom2Bufn
2.29 ToCom3Bufn
2.30 ToCom4Bufn
2.31 ToComStr
2.32 ToCom1Str
2.33 ToCom2Str
2.34 ToCom3Str
2.35 ToCom4Str
2.36 ClearCom
2.37 ClearCom1
2.38 ClearCom2
2.39 ClearCom3
2.40 ClearCom4
2.41 WaitTransmitOver
2.42 WaitTransmitOver1
2.43 WaitTransmitOver2
2.44 WaitTransmitOver3
2.45 WaitTransmitOver4
2.46 Set485DirToTransmit
2.47 Set485DirToReceive
2.48 IsCom3OutBufEmpty
2.49 IsCom4OutBufEmpty
2.50 DataSizeInCom
2.51 DataSizeInCom1
2.52 DataSizeInCom2
2.53 DataSizeInCom3
2.54 DataSizeInCom4
2.55 SendCmdTo7000
2.56 ReceiveResponseFrom7000
2.57 LedOff
2.58 LedOn
2.59 Init5DigitLed
2.60 Show5DigitLed
2.61 Show5DigitLedWithDot
2.62 Show5DigitLedSeg
2.63 Set5DigitLedTestMode
2.64 Set5DigitLedIntensity
2.65 Disable5DigitLed
2.66 Enable5DigitLed
2.67 ReadNVRAM
2.68 WriteNVRAM
2.69 WriteEEP
2.70 ReadEEP
2.71 EnableEEP
2.72 ProtectEEP
2.73 FlashReadId
2.74 FlashWrite
2.75 FlashErase
2.76 FlashRead
2.77 EnableWDT
2.78 RefreshWDT
2.79 DisableWDT
2.80 IsResetByWatchDogTimer
2.81 IsResetByPowerOff
2.82 TimerOpen
2.83 TimerClose
2.84 TimerResetValue
2.85 TimerReadValue
2.86 StopWatchReset
2.87 StopWatchStart
2.88 StopWatchStop
2.89 StopWatchPause
2.90 StopWatchContinue
2.91 StopWatchReadValue
2.92 CountDownTimerStart
2.93 CountDownTimerReadValue
2.94 InstallUserTimer
2.95 InstallUserTimer1C
2.96 DelayTimeMs
2.97 DelayMs
2.98 Delay
2.99 Delay_1
2.100 getch4
2.101 kbhit4
2.102 ungetch4
2.103 putch4
2.104 InitLib
2.105 GetLibVersion
2.106 Is7188
2.107 ReadInitPin
2.108 hex_to_ascii
2.109 ascii_to_hex
2.110 _MK_FP
2.111 SetDtrActive
2.112 SetDtrInactive
2.113 SetRtsActive
2.114 SetRtsInactive
2.115 printCom
2.116 printCom1
2.117 printCom2
2.118 printCom3
2.119 printCom4
2.120 GetCtsStatus
2.121 GetDsrStatus
 

1 C Language Library

1.1 CONST defined in 7188.H

#define NoError 0
#define InitPinIsOpen 0
#define InitPinIsNotOpen 1
#define QueueIsEmpty 0
#define QueueIsNotEmpty 1
#define PortError -1
#define DataError -2
#define ParityError -3
#define StopError -4
#define TimeOut -5
#define QueueEmpty -6
#define QueueOverflow -7
#define PosError -8
#define AddrError -9
#define BlockError -10
#define WriteError -11
#define SegmentError -12
#define BaudRateError -13
#defineCheckSumError -14
#define ChannelError -15
#define TimeIsUp 1

1.2 Functions By type

1.2.1 Functions for COM ports

Install comport driver
Function name
description
InstallCom For any one of 4 comports
InstallCom1 For com1
InstallCom2 For com2
InstallCom3 For com3
InstallCom4 For com4


 

Uninstall comport driver
Function name
description
RestoreCom For any one of 4 comports
RestoreCom1 For com1
RestoreCom2 For com2
RestoreCom3 For com3
RestoreCom4 For com4


 

Check if has data in comport input buffer
Function name
description
IsCom For any one of 4 comports
IsCom1 For com1
IsCom2 For com2
IsCom3 For com3
IsCom4 For com4


 

Read one byte data from comport input buffer
Function name
description
ReadCom For any one of 4 comports
ReadCom1 For com1
ReadCom2 For com2
ReadCom3 For com3
ReadCom4 For com4


 

Send one byte data to comport
Function name
description
ToCom For any one of 4 comports
ToCom1 For com1
ToCom2 For com2
ToCom3 For com3
ToCom4 For com4


 

Send n bytes data to comport
Function name
description
ToComBufn For any one of 4 comports
ToCom1Bufn For com1
ToCom2Bufn For com2
ToCom3Bufn For com3
ToCom4Bufn For com4


 

Send string to comport
Function name
description
ToComStr For any one of 4 comports
ToCom1Str For com1
ToCom2Str For com2
ToCom3Str For com3
ToCom4Str For com4


 

Clear all data in comport input buffer
Function name
description
ClearCom For any one of 4 comports
ClearCom1 For com1
ClearCom2 For com2
ClearCom3 For com3
ClearCom4 For com4


 

Wait data send out to comport transmit over
Function name
description
WaitTransmitOver For any one of 4 comports
WaitTransmitOver1 For com1
WaitTransmitOver2 For com2
WaitTransmitOver3 For com3
WaitTransmitOver4 For com4


 

Set the direction of RS-485 bus
Function name
description
Set485DirToTransmit Set to transmit mode, For com1 & com2
Set485DirToReceive Set to receive mode, For com1 & com2


 

Check if comport output buffer is empty
Function name
description
IsCom3OutBufEmpty For com 3
IsCom4OutBufEmpty For com 4


 

Get the data size in comport input buffer
Function name
description
DataSizeInCom For any one of 4 comports
DataSizeInCom1 For com1
DataSizeInCom2 For com2
DataSizeInCom3 For com3
DataSizeInCom4 For com4


 

Communication with 7000's module
Function name
description
SendCmdTo7000 Send command to 7000's module 
ReceiveResponseFrom7000 Receive response from 7000's module

1.2.2 Functions for LED


 
For red LED ON/OFF
Function name
description
LedOff Set LED Off
LedOn Set LED On

1.2.3 Functions for 5-Digit LED

Function name description
Init5DigitLed Initialize 5-Digit Led
Show5DigitLed Show digit number(0-F)
Show5DigitLedWithDot Show digit number and the dot '.'
Show5DigitLedSeg Show any segment
Set5DigitLedTestMode Set to test mode, all segment will be turn ON
Set5DigitLedIntensity Set the intensity of 5-Digit LED
Disable5DigitLed Disable 5-Digit LED, all segment will be OFF
Enable5DigitLed Back to normal mode

1.2.4 Functions for data storage

For NVRAM
Function name description
ReadNVRAM Read one byte data from NVRAM
WriteNVRAM Write one byte data to NVRAM


 

For EEPROM
Function name description
WriteEEP Write one byte data to EEPROM
ReadEEP Read one byte data from EEPROM
EnableEEP Enable EEPROM, so it can be write
ProtectEEP Set EEPROM to write protect


 

For Flash Memory
Function name description
FlashReadId Read the Flash Memory type
FlashWrite Write one byte data to Flash Memory
FlashErase Erase one sector of flash memory
FlashRead Read one byte data from Flash Memory

1.2.5 Functions for WatchDog Timer

Function name description
EnableWDT Enable WatchDog timer
RefreshWDT Refresh WatchDog timer
DisableWDT Disable WatchDog timer
IsResetByWatchDogTimer Check if 7188 is reset by WatchDog timer
IsResetByPowerOff Check if 7188 is reset by Power Off

1.2.6 Functions for timer¡@

Function name description
TimerOpen Install timer driver
TimerClose Uninstall timer driver
TimerResetValue Reset timer ticks to 0
TimerReadValue Read timer ticks
StopWatchReset Reset stopwatch timer value to 0
StopWatchStart Start stopwatch
StopWatchStop Stop stopwatch
StopWatchPause Pause stopwatch
StopWatchContinue Continue stopwatch
StopWatchReadValue Read the timer value of stopwatch
CountDownTimerStart Start countdown timer
CountDownTimerReadValue Read the timer value of countdown timer
InstallUserTimer Install user's timer function
InstallUserTimer1C Install user's timer function on INT 0x1C
DelayTimeMs Delay time, unit is 1ms(use software)
DelayMs Delay time, unit is 1ms(use hardware)
Delay Delay time, unit is 1ms(use hardware)
Delay_1 Delay time, unit is 0.1ms(use hardware)

1.2.7 Functions for stdio

Function name description
getch4 For instead of getch
kbhit4 For instaed of kbhit
ungetch4 For instead of ungetch
putch4 For instead of putchar

1.2.8 MISC functions


 
Function name description
InitLib Initial 7188 library
GetLibVersion Get version number of 7188 library
Is7188 Check if the program is run on 7188
ReadInitPin Read the INIT* pin status
hex_to_ascii[16] Global variable,for convert 0-15 to '0'-'F'
ascii_to_hex For convert '0'-'F' to 0-15
_MK_FP Make a far pointer

2. 7188(D)/DOS library reference

2.1 InstallCom

2.2 InstallCom1

2.3 InstallCom2

2.4 InstallCom3

2.5 InstallCom4

2.6 RestoreCom

2.7 RestoreCom1

2.8 RestoreCom2

2.9 RestoreCom3

2.10 RestoreCom4

2.11 IsCom

2.12 IsCom1

2.13 IsCom2

2.14 IsCom3

2.15 IsCom4

2.16 ReadCom

2.17 ReadCom1

2.18 ReadCom2

2.19 ReadCom3

2.20 ReadCom4

2.21 ToCom

2.22 ToCom1

2.23 ToCom2

2.24 ToCom3

2.25 ToCom4

2.26 ToComBufn

2.27 ToCom1Bufn

2.28 ToCom2Bufn

2.29 ToCom3Bufn

2.30 ToCom4Bufn

2.31 ToComStr

2.32 ToCom1Str

2.33 ToCom2Str

2.33 ToCom2Str

2.35 ToCom4Str

2.36 ClearCom

2.37 ClearCom1

2.38 ClearCom2

2.39 ClearCom3

2.40 ClearCom4

2.41 WaitTransmitOver

2.42 WaitTransmitOver1

2.43 WaitTransmitOver2

2.44 WaitTransmitOver3

2.45 WaitTransmitOver4

2.46 Set485DirToTransmit

2.47 Set485DirToReceive

2.48 IsCom3OutBufEmpty

2.49 IsCom4OutBufEmpty

2.50 DataSizeInCom

2.51 DataSizeInCom1

2.52 DataSizeInCom2

2.53 DataSizeInCom3

2.54 DataSizeInCom4

2.55 SendCmdTo7000

2.56 ReceiveResponseFrom7000

2.57 LedOff

2.58 LedOn

2.59 Init5DigitLed

2.60 Show5DigitLed

2.61 Show5DigitLedWithDot

2.62 Show5DigitLedSeg

2.63 Set5DigitLedTestMode

2.64 Set5DigitLedIntensity

2.65 Disable5DigitLed

2.66 Enable5DigitLed

2.67 ReadNVRAM

2.68 WriteNVRAM

2.69 WriteEEP

2.70 ReadEEP

2.71 EnableEEP

2.72 ProtectEEP

2.73 FlashReadId

2.74 FlashWrite

2.75 FlashErase

2.76 FlashRead

2.77 EnableWDT

2.78 RefreshWDT

2.79 DisableWDT

2.80 IsResetByWatchDogTimer

2.81 IsResetByPowerOff

2.82 TimerOpen

2.83 TimerClose

2.84 TimerResetValue

2.85 TimerReadValue

2.86 StopWatchReset

2.87 StopWatchStart

2.88 StopWatchStop

2.89 StopWatchPause

2.90 StopWatchContinue

2.91 StopWatchReadValue

2.92 CountDownTimerStart

2.93 CountDownTimerReadValue

2.94 InstallUserTimer

2.95 InstallUserTimer1C

2.96 DelayTimeMs

2.97 DelayMs

2.98 Delay

2.99 Delay_1

2.100 getch4

2.101 kbhit4

2.102 ungetch4

2.103 putch4

2.104 InitLib

2.105 GetLibVersion

2.106 Is7188

2.107 ReadInitPin

2.108 hex_to_ascii

2.109 ascii_to_hex

2.110 _MK_FP

2.111 SetDtrActive

2.112 SetDtrInactive

2.113 SetRtsActive

2.114 SetRtsInactive

2.115 printCom

2.116 printCom1

2.117 printCom2

2.118 printCom3

2.119 printCom4

2.120 GetCtsStatus

2.121 GetDsrStatus