62
CipherLab BASIC Programming Part I
IOPIN_STATUS 8000, 8200, 8300, 8400, 8700
Purpose To check the I/O pin status.
Syntax A% = IOPIN_STATUS(N%)
Remarks “A%” is an integer variable to be assigned to the result.
“N%” is an integer variable, indicating the item to be checked with.
0 For 8000/8300: It’s the same using
IRDA_STATUS(0) to check IrDA
connection status.
When A% = 0, it means the IrDA connection is disabled.
When A% = 1, it means the IrDA connection is enabled.
For 8200/8400/8700: It always return 1. (A% = 1)
1 To check whether data transmission is successful or not.
A% = the length of string, including delimiters.
2 For 8200/8400/8700 only: To check whether the mobile computer
connected via cradle, cable or 5V DC adapter.
A% = A value that sums up values of each item.
a certain item as shown below.
Bit
Value Item
Remarks
0~
3
0x00 NO_CRADLE Not seated in any cradle.
0x01 MODEM_CRADLE Seated in the Modem Cradle.
0x02 ETHERNET_CRADLE Seated in the Ethernet Cradle.
0x03 GPRS_CRADLE
Cradle.
0x04 CHARGER_CRADLE
Communication Cradle.
4 0x00 RS232_CABLE_
DISCONNECTED
RS-232 cable is not connected.
0x10 RS232_CABLE_
CONNECTED
RS-232 cable is connected.
5 0x00 USB_CABLE_
DISCONNECTED
USB cable is not connected.
0x20 USB_CABLE_
CONNECTED
USB cable is connected.
6 0x00 ADAPTER_
DISCONNECTED
connected.
0x40 ADAPTER
_CONNECTED
5V DC adapter is connected.