beautypg.com

Read gpio value +wior, Write gpio value +wiow – Multi-Tech Systems MMCModem GPRS (MTMMC-G) User Manual

Page 114

background image

Chapter 13 – Specific AT Commands

Multi-Tech Systems, Inc. Wireless GSM/GPRS AT Commands (Document Number S000293I)

114

Read GPIO Value +WIOR

Description:

Read the requested GPI or GPIO pin value.

Notes:

By default (e.g., after a reset), the I/O ports configuration is set by the

+WIOM command.

This command is allowed only on a GPIO not allocated by an Open-AT embedded application or
for bus operations.

When the BT chip is switched on, the GPIO5 is not available anymore.

Values:

Up to ten I/O ports are available. The value is between 0 and 9.

0

I/O port number is reset.

1

I/O port number is set.

Syntax: Command

syntax:

AT+WIOR=

Response

syntax:

+WIOR:

Command

Possible responses

AT+WIOR=0
Read I/O (number 0) value

+WIOR: 0
OK
GPIO number 0 is reset


Write GPIO Value +WIOW

Description:

Set the requested GPO or GPIO pin value.

Notes:

By default (e.g., after a reset), the I/O ports configuration is set by the

+WIOM command.

This command is allowed only on a GPIO not allocated by an Open-AT embedded application or
for bus operations.

When the BT chip is switched on, the GPIO5 is not available anymore. It is not possible to
change the state of the GPIO using this command.

Values:

Up to ten I/O ports are available. The value is between 0 and 9.

0

I/O port number is reset.

1

I/O port number is set.

Syntax:

Command syntax: AT+WIOW=,

Command

Possible responses

AT+WIOW=2,0
Reset I/O (number 2)

OK
GPIO value is written

This manual is related to the following products: