Platform-specific layer provides a consistent System API to upper layers of the driver.
System API Overview
This API contains the functions to configure and control the system module of the programmable XBee devices.
- System initialization and configuration functions:
void sys_clocks_init |
( |
void |
| ) |
|
Initializes all the system clocks.
- Parameters
-
- Return values
-
Gets the hardware ID of the device.
- Parameters
-
- Return values
-
uint8_t | the hardware ID of the module. |
void sys_halt |
( |
char * |
str | ) |
|
Prints out the given string, disables IRQs and stops the application execution.
- Parameters
-
[in] | str | the message to print. |
- Return values
-
Initializes the device. Calls the different module initialization functions.
- Parameters
-
- Return values
-
void sys_irqs_disable |
( |
void |
| ) |
|
Disables the IRQs.
- Parameters
-
- Return values
-
void sys_irqs_enable |
( |
void |
| ) |
|
Enables the IRQs.
- Parameters
-
- Return values
-
Restarts the device.
- Parameters
-
[in] | reason | the reason ID for the reset. See the app_rst_casuses_t type value for more information. |
- Return values
-
Performs a software delay of delay micro seconds.
- Parameters
-
delay | number of microseconds to delay the program execution. |
- Return values
-
void sys_watchdog_reset |
( |
void |
| ) |
|
Resets the watchdog timer.
- Parameters
-
- Return values
-
int sys_xbee_init |
( |
void |
| ) |
|
Initializes the ZigBee network. Will initailize or not, depending on the configuration the APS-layer (endpoint/cluster).
- Parameters
-
[in] | xbee | XBee device to configure. |
- Return values
-
0 | on success, error code otherwise. |
int sys_xbee_tick |
( |
void |
| ) |
|
Calls wpan_tick or xbee_dev_tick depending on the configuration of the ZigBee network. The callee will poll the underlaying hardware for new frames that will be processed by the respective frame handlers. wpan_tick also time outs expired conversations. Needs to be called often enough to keep up with inbound bytes.
- Parameters
-
[in] | xbee | XBee device to check for, and then dispatch, new frames. |
- Return values
-
Variable | The value returned by xbee_dev_tick or wpan_tick, The depending on the function called. Check that functions for additional information. |