6: Configurable Pins
WiPort® NR Embedded Device Server User Guide
61
Example 2: PC sends command 1Bh to change the current states of GPIO 0
and 1 (assuming they are configured as outputs).
PC -> WiPort NR: 1Bh, 01h, 02h, 00h, 00h, 01h, 00h, 00h, 00h
WiPort NR -> PC: 1Bh, 01h, 00h, 00h, 00h
Command details:
1Bh = command 1Bh
01h, 00h, 00h, 00h = the mask that determines which GPIOs will be changed.
bit 0 and 9 are 1
→
GPIO0 and GPIO9 will be changed.
bit 1 is 0
→
GPIO1 will remain the same.
01h, 00h, 00h, 00h = the new states
bit 0 is 1
→
GPIO0 will become 1.
bit 1 is ignored since it is masked out.
bit 0 is 0
→
GPIO9 will become 0.
Response details:
1Bh = response to command 1Bh
01h, 00h, 00h, 00h =
bit 0 is 1
→
GPIO0 = 1
bit 1 is 1
→
GPIO1 = 1
bit 9 is 0
→
GPIO9 = 0