Configurable Pins
Bytes
Command 1Ah, Set Active Levels
Send:
2parameters Bytes
Bit X 1 means the direction for GPIO X will be updated with the value in the second parameter.
0 means the active type for that GPIO will not change.
Bytes
Bit X 1 means GPIO X will become active low.
0 means it will become active high.
Response:
1 parameter
Bytes
Command 1Bh, Set States
Send:
2parameters Bytes
Bit X 1 means the state for GPIO X will be updated with the value in the second parameter.
0 means the state for that GPIO will not change.
Bytes
Bit X 1 means GPIO X will become active.
0 means it will become inactive.
Response:
1 parameter
Bytes
Examples
Example 1: PC sends command 10h to find out which configurable pins are available as GPIO.
PC
WiPort
Command details:
10h = command 10h
00h, 00h, 00h, 00h = ignored 00h, 00h, 00h, 00h = ignored
Response details:
10h = response to command 10h 03h, 00h, 02h, 00h =
bits 0, 1, and 9 are 0 →CP0, CP1, and CP9 are configured as GPIOs (i.e. GPIO0, GPIO1, GPIO9).
WiPort™ User Guide |