63
3 For 8200/8400/8700 only: To get the status when
use.
A% = A value that indicates the current status.
0 USB is disconnected.
1 USB is connected and device is not being accessed.
3 USB is connected and device is being accessed.
4 For 8000/8300: To get the charging status.
A% = A value that indicates the current status.
0 No connection to external power.
1 Battery is being charged.
2 Battery charging done.
3 Charging error occurs.
Example
U% = IOPIN_STATUS(2)
‘ *** Detect Cradle ***
V% = BIT_OPERATOR(1, U%, 15)
‘ Get the value of Bit 0~3 to check if any cradle detected
IF V% = 2 THEN ‘ Check if Ethernet cradle
PRINT “Seated in Ethernet cradle”
ENDIF
‘ *** Check if USB cable connected ***
V% = BIT_OPERATOR(1, U%, 32)
‘ Get the value of Bit 5 to check if USB cable detected
IF V% = 32 THEN ‘ 32 = 0x20
PRINT “USB cable connected”
ENDIF