Digi XBee(R) ANSI C Host Library
Files | Data Structures | Macros | Enumerations | Functions | Variables
HAL: libdigiapix (Digi ConnectCore)

Support for Digi International products using libdigiapix to control GPIO pins. More...

Files

file  platform_config.h
 
file  xbee_platform_digiapix.c
 Based on POSIX platform, with additional code to interface with /RESET, SLEEP_REQ, ON/nSLEEP and XBEE_IDENT pins.
 

Data Structures

struct  gpio_xbee_t
 

Macros

#define XBEE_PLATFORM_INIT()   digiapix_platform_init()
 
#define XBEE_RESET_FN   &digiapix_xbee_reset
 
#define XBEE_IS_AWAKE_FN   &digiapix_xbee_is_awake
 
#define CC6UL_IO(x)   (465U + (x))
 

Enumerations

enum  { IO_XBEE_RESET, IO_XBEE_ON_NSLEEP }
 

Functions

int digiapix_platform_init (void)
 
void digiapix_xbee_reset (struct xbee_dev_t *xbee, bool_t asserted)
 
int digiapix_xbee_is_awake (struct xbee_dev_t *xbee)
 
uint32_t xbee_seconds_timer ()
 Platform-specific function to return the number of elapsed seconds. More...
 
uint32_t xbee_millisecond_timer ()
 Platform-specific function to return the number of elapsed milliseconds. More...
 

Variables

const gpio_xbee_t gpio_config []
 
gpio_t * gpio [_TABLE_ENTRIES(gpio_config)]
 

Detailed Description

Support for Digi International products using libdigiapix to control GPIO pins.

See also
HAL: POSIX (Linux/Mac)

Function Documentation

int digiapix_xbee_is_awake ( struct xbee_dev_t xbee)
See also
xbee_is_awake_fn

References EIO.

void digiapix_xbee_reset ( struct xbee_dev_t xbee,
bool_t  asserted 
)
See also
xbee_reset_fn
uint32_t xbee_millisecond_timer ( void  )

Platform-specific function to return the number of elapsed milliseconds.

OK for this counter to rollover. Used for timing and should have a resolution of at least 60ms.

  • Rabbit has 1ms resolution.
  • HCS08 has 4ms resolution.
  • DOS has 18 ticks/second (55.55ms resolution)

(Function name wrapped in parentheses so platforms can use a macro function of the same name.)

Returns
Number of elapsed milliseconds.
See also
XBEE_MS_TIMER_RESOLUTION
uint32_t xbee_seconds_timer ( void  )

Platform-specific function to return the number of elapsed seconds.

On some platforms, this is the equivalent of an "uptime".

On other platforms, it may reflect the value of the RTC, which might not be synchronized with a time server and might include leap seconds.

Regardless, it should consistently report elapsed time and not jump on clock synchronization.

In addition to determining timeouts, the ZCL Time Cluster makes use of it to report current time.

(Function name wrapped in parentheses so platforms can use a macro function of the same name.)

Returns
Number of elapsed seconds.

Variable Documentation

const gpio_xbee_t gpio_config[]
Initial value:
= {
{ "RESET", -1, CC6UL_IO(7), GPIO_OUTPUT_HIGH },
{ "ON_nSLEEP", 9, CC6UL_IO(11), GPIO_INPUT },
}