|
#define | XBEE_CW6 |
|
#define | __FUNCTION__ "xbee" |
|
#define | LITTLE_ENDIAN 1234 |
|
#define | BIG_ENDIAN 4321 |
|
#define | PDP_ENDIAN 3412 |
|
#define | BYTE_ORDER BIG_ENDIAN |
|
#define | _f_memcpy memcpy |
|
#define | _f_memset memset |
|
#define | INT16_C(x) (x) |
|
#define | UINT16_C(x) (x ## U) |
|
#define | INT32_C(x) (x ## L) |
|
#define | UINT32_C(x) (x ## UL) |
|
#define | PRId16 "d" |
|
#define | PRIu16 "u" |
|
#define | PRIx16 "x" |
|
#define | PRIX16 "X" |
|
#define | FAR |
|
#define | SERIAL_PORT_SCI1 1 |
|
#define | SERIAL_PORT_SCI2 2 |
|
#define | ZCL_TIME_EPOCH_DELTA 0 |
|
#define | HAVE_SWAP_FUNCS 1 |
|
#define | xbee_seconds_timer() (SEC_TIMER) |
|
#define | xbee_millisecond_timer() (MS_TIMER) |
|
#define | XBEE_MS_TIMER_RESOLUTION 4 |
|
#define | RTS_ASSERT_BYTES 8 |
|
#define | _FLAG_FLOW(x) (x) |
|
#define | _FLAG_RTS(x) (x << 2) |
|
#define | _FLAG_FLOW_HOST _FLAG_FLOW(1) |
|
#define | _FLAG_FLOW_EMBER _FLAG_FLOW(2) |
|
#define | _FLAG_RTS_HOST _FLAG_RTS(1) |
|
#define | _FLAG_RTS_EMBER _FLAG_RTS(2) |
|
#define | LOOPBACK_OFF (0*SCI1C1_LOOPS_MASK) |
|
#define | LOOPBACK_ON (1*SCI1C1_LOOPS_MASK) |
|
#define | UART_OFF_DURING_WAIT (1*SCI1C1_SCISWAI_MASK) |
|
#define | UART_ON_DURING_WAIT (0*SCI1C1_SCISWAI_MASK) |
|
#define | LOOPBACK_TWO_WIRE (0*SCI1C1_RSRC_MASK) |
|
#define | LOOPBACK_ONE_WIRE (1*SCI1C1_RSRC_MASK) |
|
#define | CHARACTER_8BIT (0*SCI1C1_M_MASK) |
|
#define | CHARACTER_9BIT (1*SCI1C1_M_MASK) |
|
#define | WAKEUP_IDLE_LINE (0*SCI1C1_WAKE_MASK) |
|
#define | WAKEUP_ADDRESS_MARK (1*SCI1C1_WAKE_MASK) |
|
#define | IDLE_COUNT_AFTER_START_BIT (0*SCI1C1_ILT_MASK) |
|
#define | IDLE_COUNT_AFTER_STOP_BIT (1*SCI1C1_ILT_MASK) |
|
#define | PARITY_OFF (0*SCI1C1_PE_MASK) |
|
#define | PARITY_ON (1*SCI1C1_PE_MASK) |
|
#define | PARITY_EVEN (0*SCI1C1_PT_MASK) |
|
#define | PARITY_ODD (1*SCI1C1_PT_MASK) |
|
#define | RX_WAKEUP_CONTROL_OFF (0*SCI1C2_RWU_MASK) |
|
#define | RX_WAKEUP_CONTROL_ON (1*SCI1C2_RWU_MASK) |
|
#define | RX_DISABLE (0*SCI1C2_RE_MASK) |
|
#define | RX_ENABLE (1*SCI1C2_RE_MASK) |
|
#define | TX_DISABLE (0*SCI1C2_TE_MASK) |
|
#define | TX_ENABLE (1*SCI1C2_TE_MASK) |
|
#define | IDLE_INTERRUPT_DISABLE (0*SCI1C2_ILIE_MASK) |
|
#define | IDLE_INTERRUPT_ENABLE (1*SCI1C2_ILIE_MASK) |
|
#define | RX_INTERRUPT_DISABLE (0*SCI1C2_RIE_MASK) |
|
#define | RX_INTERRUPT_ENABLE (1*SCI1C2_RIE_MASK) |
|
#define | TX_COMPLETE_INTERRUPT_DISABLE (0*SCI1C2_TCIE_MASK) |
|
#define | TX_COMPLETE_INTERRUPT_ENABLE (1*SCI1C2_TCIE_MASK) |
|
#define | TX_BUFFER_READY_INTERRUPT_DISABLE (0*SCI1C2_TIE_MASK) |
|
#define | TX_BUFFER_READY_INTERRUPT_ENABLE (1*SCI1C2_TIE_MASK) |
|
#define | RX_PARITY_ERROR_INTERRUPT_DISABLE (0*SCI1C3_PEIE_MASK) |
|
#define | RX_PARITY_ERROR_INTERRUPT_ENABLE (1*SCI1C3_PEIE_MASK) |
|
#define | RX_FRAMING_ERROR_INTERRUPT_DISABLE (0*SCI1C3_FEIE_MASK) |
|
#define | RX_FRAMING_ERROR_INTERRUPT_ENABLE (1*SCI1C3_FEIE_MASK) |
|
#define | RX_NOISE_ERROR_INTERRUPT_DISABLE (0*SCI1C3_NEIE_MASK) |
|
#define | RX_NOISE_ERROR_INTERRUPT_ENABLE (1*SCI1C3_NEIE_MASK) |
|
#define | RX_OVERRUN_INTERRUPT_DISABLE (0*SCI1C3_ORIE_MASK) |
|
#define | RX_OVERRUN_INTERRUPT_ENABLE (1*SCI1C3_ORIE_MASK) |
|
#define | TX_DATA_NORMAL (0*SCI1C3_TXINV_MASK) |
|
#define | TX_DATA_INVERTED (1*SCI1C3_TXINV_MASK) |
|
#define | ONE_WIRE_RX_MODE (0*SCI1C3_TXDIR_MASK) |
|
#define | ONE_WIRE_TX_MODE (1*SCI1C3_TXDIR_MASK) |
|
#define | RX_BREAK_DETECT_10_BITS (0*SCI1S2_LBKDE_MASK) |
|
#define | RX_BREAK_DETECT_11_BITS (1*SCI1S2_LBKDE_MASK) |
|
#define | TX_BREAK_10_BITS (0*SCI1S2_BRK13_MASK) |
|
#define | TX_BREAK_13_BITS (1*SCI1S2_BRK13_MASK) |
|
#define | RX_IDLE_DETECT_OFF (0*SCI1S2_RWUID_MASK) |
|
#define | RX_IDLE_DETECT_ON (1*SCI1S2_RWUID_MASK) |
|
#define | RX_DATA_INVERTED (1*SCI1S2_RXINV_MASK) |
|
#define | RX_DATA_NORMAL (0*SCI1S2_RXINV_MASK) |
|
#define | XBEE_SER_CHECK(ptr) |
|
#define | XBEE_SER_CHECK_RTS(s) |
|
#define | SCIxC1_DEFAULT |
|
#define | SCIxC3_DEFAULT |
|
#define | SCIxS2_DEFAULT |
|
#define | SCIxC2_DEFAULT |
|
#define | _ISR_RTS(port, pin) |
|
|
void | xbee_reset_radio (struct xbee_dev_t *xbee, bool_t asserted) |
| Function to pass to xbee_dev_init() to control the EM250's /RESET pin on PTCD4.
|
|
uint32_t() | xbee_seconds_timer (void) |
| Platform-specific function to return the number of elapsed seconds. More...
|
|
uint32_t() | xbee_millisecond_timer (void) |
| Platform-specific function to return the number of elapsed milliseconds. More...
|
|
uint16_t | swap16 (uint16_t value) |
| Swap the byte order of a 16-bit value. More...
|
|
uint32_t | swap32 (uint32_t value) |
| Swap the byte order of a 32-bit value. More...
|
|
bool_t | xbee_ser_invalid (xbee_serial_t *serial) |
| Helper function used by other xbee_serial functions to validate the serial parameter. More...
|
|
const char * | xbee_ser_portname (xbee_serial_t *serial) |
| Returns a human-readable string describing the serial port. More...
|
|
int | xbee_ser_write (xbee_serial_t *serial, const void FAR *buffer, int length) |
| Transmits length bytes from buffer to the XBee serial port serial. More...
|
|
int | xbee_ser_read (xbee_serial_t *serial, void FAR *buffer, int bufsize) |
| Reads up to bufsize bytes from XBee serial port serial and into buffer. More...
|
|
int | xbee_ser_putchar (xbee_serial_t *serial, uint8_t ch) |
| Transmits a single character, ch, to the XBee serial port serial. More...
|
|
int | xbee_ser_getchar (xbee_serial_t *serial) |
| Reads a single character from the XBee serial port serial. More...
|
|
int | xbee_ser_tx_free (xbee_serial_t *serial) |
| Returns the number of bytes of unused space in the serial transmit buffer for XBee serial port serial. More...
|
|
int | xbee_ser_tx_used (xbee_serial_t *serial) |
| Returns the number of queued bytes in the serial transmit buffer for XBee serial port serial. More...
|
|
int | xbee_ser_tx_flush (xbee_serial_t *serial) |
| Flushes (i.e., deletes and does not transmit) characters in the serial transmit buffer for XBee serial port serial. More...
|
|
int | xbee_ser_rx_free (xbee_serial_t *serial) |
| Returns the number of bytes of unused space in the serial receive buffer for XBee serial port serial. More...
|
|
int | xbee_ser_rx_used (xbee_serial_t *serial) |
| Returns the number of queued bytes in the serial receive buffer for XBee serial port serial. More...
|
|
int | xbee_ser_rx_flush (xbee_serial_t *serial) |
| Deletes all characters in the serial receive buffer for XBee serial port serial. More...
|
|
int | xbee_ser_baudrate (xbee_serial_t *serial, uint32_t baudrate) |
| Change the baud rate of XBee serial port serial to baudrate bits/second. More...
|
|
int | xbee_ser_open (xbee_serial_t *serial, uint32_t baudrate) |
| Opens the serial port connected to XBee serial port serial at baudrate bits/second. More...
|
|
int | xbee_ser_close (xbee_serial_t *serial) |
| Close the serial port attached to XBee serial port serial. More...
|
|
int | xbee_ser_break (xbee_serial_t *serial, bool_t enabled) |
| Disable the serial transmit pin and pull it low to send a break to the XBee serial port. More...
|
|
int | xbee_ser_flowcontrol (xbee_serial_t *serial, bool_t enabled) |
| Enable or disable hardware flow control (CTS/RTS) on the serial port for XBee serial port serial. More...
|
|
int | xbee_ser_set_rts (xbee_serial_t *serial, bool_t asserted) |
| Disable hardware flow control and manually set the RTS (ready to send) pin on the XBee device's serial port. More...
|
|
int | xbee_ser_get_cts (xbee_serial_t *serial) |
| Read the status of the /CTS (clear to send) pin on the serial port connected to XBee serial port serial. More...
|
|
| xbee_cbuf_putch (EMBER_SERIAL_PORT.rxbuf, SCI2D) |
| This is the ISR for receiving data on the SCI2 serial port, which is connected to the Ember radio on the Programmable XBee. More...
|
|
| _ISR_RTS (EMBER, PTCD_PTCD1) |
|
Freescale HCS08 platform (XBee Programmable using CodeWarrior).
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.