User’s Manual
50
zb_io_init (cont’d)
The pins are configured as analog inputs or as digital I/O using the following macros as exam-
ples before
#use XBEE_API.LIB
.
#define DIO_00 XBEE_IO_CONF_ANAIN // bit 4
#define DIO_01 XBEE_IO_CONF_ANAIN // bit 3
#define DIO_02 XBEE_IO_CONF_ANAIN // bit 2
#define DIO_03 XBEE_IO_CONF_ANAIN // bit 1
#define DIO_12 XBEE_IO_CONF_DIGIN // bit 10
#define DIO_05 XBEE_IO_CONF_DIGOUT_HIGH // bit 8
#define DIO_04 XBEE_IO_CONF_DIGOUT_HIGH // bit 0
#define DIO_10 XBEE_IO_CONF_DIGOUT_LOW // bit 11
#define DIO_11 XBEE_IO_CONF_DIGIN // bit 12
NOTE:
The mask order is different than for
DIO_INPUTS
. While all pins can be configured as
either inputs or outputs, only
DIO_00
–
DIO_03
can be configured as analog inputs.
RETURN VALUE
0 — success.
0 — one of the error codes returned by
zb_API_ATCmdResponse()