XBee Firmware Library  1.6.0
Functions
Interrupt ReQuest Control (IRQ)

Functions

int gpio_config_irq (xpin_t pin, bool_t type, bool_t edge)
 Configures the specified XBee pin as IRQ. More...
 
int gpio_enable_xpin_irq (xpin_t pin, bool_t enable)
 Enables or disables a specific IRQ. More...
 
void gpio_irq_enable (bool_t enable)
 Enables or disables all the IRQs. More...
 

Detailed Description

IRQ API Overview

This API contains the functions to configure and control the IRQs of the 

the programmable XBee devices.

- IRQ configuration functions:
    - gpio_config_irq()
    - gpio_irq_enable()

IRQ Macros

The gpio_config_irq() function needs as second and third parameters the 
detection and activation modes to configure the IRQ. These parameters 
are defined with macros and they are the following:

    - Macros to configure the \b detection \b mode of the IRQ: 
            - \b GPIO_CFG_LEVEL_IRQ                 : Configures the detection mode as
                                                                              level - \b 0.
            - \b GPIO_CFG_EDGE_IRQ                  : Configures the detection mode as
                                                                              edge - \b 1.

    - Macros to configure the \b active \b edge (when the detection 
      mode is configured as \b edge):
            - \b GPIO_IRQ_EDGE_RISE                 : Select the rise-edge mode - \b 1.
            - \b GPIO_IRQ_EDGE_FALL                 : Select the fall-edge mode - \b 0.

    - Macros to configure the \b active \b level (when the detection 
      mode is configured as \b level):
            - \b GPIO_IRQ_LEVEL_HIGH                : Select the high-level mode - \b 1.
            - \b GPIO_IRQ_LEVEL_LOW                 : Select the low-level mode - \b 0.

Usage example:
gpio_config_irq(XPIN_7, GPIO_CFG_LEVE_IRQ, GPIO_IRQ_LEVEL_HIGH);
Warning
It is recommended not to use these macros, they are used by the XBee Project Smart Editor of the XBee extensions.

Function Documentation

int gpio_config_irq ( xpin_t  pin,
bool_t  type,
bool_t  edge 
)

Configures the specified XBee pin as IRQ.

Parameters
[in]enable1 to enable the IRQ, 0 to disable it.
[in]typethe detection mode of the IRQ. 0 to detect the interruption with level, 1 to detect it with edge. See IRQ Macros for more information.
[in]edge0 to detect the interruption with a high level or a rise edge. 1 to detect it with a low level or a fall edge. See IRQ Macros for more information.
Return values
EINVALinvalid xpin_t parameter (not IRQ capable pin).
0on success.
int gpio_enable_xpin_irq ( xpin_t  pin,
bool_t  enable 
)

Enables or disables a specific IRQ.

Parameters
[in]pinthe XBee pin containing the IRQ that will be enabled or disabled.
[in]enable0 to disable the IRQ, 1 to enable it.
Return values
EINVALinvalid xpin_t parameter (not IRQ capable pin).
0on success.
void gpio_irq_enable ( bool_t  enable)

Enables or disables all the IRQs.

Parameters
[in]enable1 to enable the IRQs, 0 to disable them.
Return values
None