Digi XBee(R) ANSI C Host Library
|
Go to the source code of this file.
Data Structures | |
struct | xbee_io_t |
struct | xbee_frame_io_response_t |
< XBEE_FRAME_IO_RESPONSE (0x92) ATSH and ATSL of sender ATMY value of sender More... | |
Macros | |
#define | XBEE_IO_ANALOG_INVALID INT16_C(-32768) |
Return code from analog I/O query functions if selected I/O is not valid. | |
#define | XBEE_IO_MIN_SAMPLE_PERIOD 50 |
Minimum automatic I/O sample period in ms. | |
Enumerations | |
enum | xbee_io_type { XBEE_IO_TYPE_DISABLED = 0, XBEE_IO_TYPE_SPECIAL = 1, XBEE_IO_TYPE_ANALOG_INPUT = 2, XBEE_IO_TYPE_DIGITAL_INPUT = 3, XBEE_IO_TYPE_DIGITAL_OUTPUT_LOW = 4, XBEE_IO_TYPE_DIGITAL_OUTPUT_HIGH = 5, XBEE_IO_TYPE_TXEN_ACTIVE_LOW = 6, XBEE_IO_TYPE_TXEN_ACTIVE_HIGH = 7, XBEE_IO_TYPE_MASK = 0x0F, XBEE_IO_TYPE_CHANGE_DETECT = 0x10, XBEE_IO_TYPE_PULLUP = 0x20, XBEE_IO_TYPE_PULLDOWN = 0x40, XBEE_IO_FORCE = 0x80, XBEE_IO_TYPE_DIGITAL_INPUT_PULLUP } |
Configuration type for XBee built-in I/Os. More... | |
enum | xbee_io_digital_output_state { XBEE_IO_SET_LOW = XBEE_IO_TYPE_DIGITAL_OUTPUT_LOW, XBEE_IO_SET_HIGH = XBEE_IO_TYPE_DIGITAL_OUTPUT_HIGH, XBEE_IO_FORCE_LOW = XBEE_IO_SET_LOW|XBEE_IO_FORCE, XBEE_IO_FORCE_HIGH = XBEE_IO_SET_HIGH|XBEE_IO_FORCE } |
Digital output state for XBee built-in I/Os configured as outputs. More... | |
Functions | |
int | xbee_io_response_parse (xbee_io_t FAR *parsed, const void FAR *source) |
Parse an I/O response and store it in an xbee_io_t structure. More... | |
void | xbee_io_response_dump (const xbee_io_t FAR *io) |
Debugging function used to dump an xbee_io_t structure to stdout. More... | |
int | xbee_io_get_digital_input (const xbee_io_t FAR *io, uint_fast8_t index) |
Return state of a digital input. More... | |
int | xbee_io_get_digital_output (const xbee_io_t FAR *io, uint_fast8_t index) |
Return state of a digital output. More... | |
int16_t | xbee_io_get_analog_input (const xbee_io_t FAR *io, uint_fast8_t index) |
Return reading of an analog input. More... | |
int | xbee_io_set_digital_output (xbee_dev_t *xbee, xbee_io_t FAR *io, uint_fast8_t index, enum xbee_io_digital_output_state state, const wpan_address_t FAR *address) |
Set state of a digital output. More... | |
int | xbee_io_configure (xbee_dev_t *xbee, xbee_io_t FAR *io, uint_fast8_t index, enum xbee_io_type type, const wpan_address_t FAR *address) |
Configure XBee digital and analog I/Os. More... | |
int | xbee_io_set_options (xbee_dev_t *xbee, xbee_io_t FAR *io, uint16_t sample_rate, uint16_t change_mask, const wpan_address_t FAR *address) |
Configure XBee automatic I/O sampling options. More... | |
int | xbee_io_query (xbee_dev_t *xbee, xbee_io_t FAR *io, const wpan_address_t FAR *address) |
int | xbee_io_query_status (xbee_io_t FAR *io) |
Check the status of querying an XBee device, as initiated by xbee_io_query(). More... | |
Variables | |
const FAR xbee_at_cmd_t | xbee_io_cmd_by_index [] |
XBee configurable I/O pin names. Bitmask applied to certain fields. | |
#define | XBEE_IO_AD0 0x0001 |
AD0 (pin 20) | |
#define | XBEE_IO_DIO0 0x0001 |
DIO0 (pin 20) - also commissioning button if so configured. | |
#define | XBEE_IO_AD1 0x0002 |
AD1 (pin 19) | |
#define | XBEE_IO_DIO1 0x0002 |
DIO1 (pin 19) | |
#define | XBEE_IO_AD2 0x0004 |
AD2 (pin 18) | |
#define | XBEE_IO_DIO2 0x0004 |
DIO2 (pin 18) | |
#define | XBEE_IO_AD3 0x0008 |
AD3 (pin 17) | |
#define | XBEE_IO_DIO3 0x0008 |
DIO3 (pin 17) | |
#define | XBEE_IO_DIO4 0x0010 |
DIO4 (pin 11) | |
#define | XBEE_IO_DIO5 0x0020 |
DIO5 (pin 15) - also ASSOC indicator if so configured. | |
#define | XBEE_IO_DIO6 0x0040 |
DIO6 (pin 16) - also RTS flow control if so configured. | |
#define | XBEE_IO_DIO7 0x0080 |
DIO7 (pin 12) - also CTS flow control if so configured. | |
#define | XBEE_IO_GPIO7 0x0080 |
#define | XBEE_IO_VCC_SENSE 0x80 |
Supply voltage sense (in xbee_io_t.analog_enabled field) | |
#define | XBEE_IO_DIO10 0x0400 |
DIO10 (pin 6) - also RSSI PWM if so configured. | |
#define | XBEE_IO_DIO11 0x0800 |
DIO11 (pin 7) | |
#define | XBEE_IO_DIO12 0x1000 |
DIO12 (pin 4) - also CD signal if so configured. | |