Remove RF API header files
xxwares ship these headers now, so we will switch to using those versions. The exceptions are IEEE API headers, which are for not part of xxwares, so we have to keep them locally for now.
This commit is contained in:
parent
ac2a31455e
commit
b67d3cc6ea
7 changed files with 0 additions and 3389 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,69 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Filename: ble_mailbox.h
|
||||
* Revised: $ $
|
||||
* Revision: $ $
|
||||
*
|
||||
* Description: Definitions for BLE interface
|
||||
*
|
||||
* Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef BLE_MAILBOX_H_
|
||||
#define BLE_MAILBOX_H_
|
||||
|
||||
/// \name Radio operation status
|
||||
///@{
|
||||
/// \name Operation finished normally
|
||||
///@{
|
||||
#define BLE_DONE_OK 0x1400 ///< Operation ended normally
|
||||
#define BLE_DONE_RXTIMEOUT 0x1401 ///< Timeout of first Rx of slave operation or end of scan window
|
||||
#define BLE_DONE_NOSYNC 0x1402 ///< Timeout of subsequent Rx
|
||||
#define BLE_DONE_RXERR 0x1403 ///< Operation ended because of receive error (CRC or other)
|
||||
#define BLE_DONE_CONNECT 0x1404 ///< CONNECT_REQ received or transmitted
|
||||
#define BLE_DONE_MAXNACK 0x1405 ///< Maximum number of retransmissions exceeded
|
||||
#define BLE_DONE_ENDED 0x1406 ///< Operation stopped after end trigger
|
||||
#define BLE_DONE_ABORT 0x1407 ///< Operation aborted by command
|
||||
#define BLE_DONE_STOPPED 0x1408 ///< Operation stopped after stop command
|
||||
///@}
|
||||
/// \name Operation finished with error
|
||||
///@{
|
||||
#define BLE_ERROR_PAR 0x1800 ///< Illegal parameter
|
||||
#define BLE_ERROR_RXBUF 0x1801 ///< No available Rx buffer (Advertiser, Scanner, Initiator)
|
||||
#define BLE_ERROR_NO_SETUP 0x1802 ///< Operation using Rx or Tx attemted when not in BLE mode
|
||||
#define BLE_ERROR_NO_FS 0x1803 ///< Operation using Rx or Tx attemted without frequency synth configured
|
||||
#define BLE_ERROR_SYNTH_PROG 0x1804 ///< Synthesizer programming failed to complete on time
|
||||
#define BLE_ERROR_RXOVF 0x1805 ///< Receiver overflowed during operation
|
||||
#define BLE_ERROR_TXUNF 0x1806 ///< Transmitter underflowed during operation
|
||||
///@}
|
||||
///@}
|
||||
|
||||
#endif /* BLE_MAILBOX_H_ */
|
File diff suppressed because it is too large
Load diff
|
@ -1,213 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Filename: data_entry.h
|
||||
* Revised: 2015-08-04 11:44:20 +0200 (Tue, 04 Aug 2015)
|
||||
* Revision: 44329
|
||||
*
|
||||
* Description: Definition of API for data exchange
|
||||
*
|
||||
* Copyright (c) 2015, Texas Instruments Incorporated
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef DATA_ENTRY_H_
|
||||
#define DATA_ENTRY_H_
|
||||
|
||||
#ifndef __RFC_STRUCT
|
||||
#ifdef __GNUC__
|
||||
#define __RFC_STRUCT __attribute__ ((aligned (4)))
|
||||
#else
|
||||
#define __RFC_STRUCT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//! \addtogroup rfc
|
||||
//! @{
|
||||
|
||||
//! \addtogroup data_entry
|
||||
//! @{
|
||||
|
||||
#include <stdint.h>
|
||||
#include "mailbox.h"
|
||||
|
||||
typedef struct __RFC_STRUCT rfc_dataEntry_s rfc_dataEntry_t;
|
||||
typedef struct __RFC_STRUCT rfc_dataEntryGeneral_s rfc_dataEntryGeneral_t;
|
||||
typedef struct __RFC_STRUCT rfc_dataEntryMulti_s rfc_dataEntryMulti_t;
|
||||
typedef struct __RFC_STRUCT rfc_dataEntryPointer_s rfc_dataEntryPointer_t;
|
||||
typedef struct __RFC_STRUCT rfc_dataEntryPartial_s rfc_dataEntryPartial_t;
|
||||
|
||||
//! \addtogroup dataEntry
|
||||
//! @{
|
||||
struct __RFC_STRUCT rfc_dataEntry_s {
|
||||
uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry
|
||||
uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to
|
||||
struct {
|
||||
uint8_t type:2; //!< \brief Type of data entry structure<br>
|
||||
//!< 0: General data entry <br>
|
||||
//!< 1: Multi-element Rx entry<br>
|
||||
//!< 2: Pointer entry<br>
|
||||
//!< 3: Partial read Rx entry
|
||||
uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element<br>
|
||||
//!< 0: No length indicator<br>
|
||||
//!< 1: One byte length indicator<br>
|
||||
//!< 2: Two bytes length indicator<br>
|
||||
//!< 3: <i>Reserved</i>
|
||||
uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated
|
||||
//!< by the radio CPU (0: 16 bytes)
|
||||
} config;
|
||||
uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to<br>
|
||||
//!< For other entries: Number of bytes following this length field
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup dataEntryGeneral
|
||||
//! @{
|
||||
//! General data entry structure (type = 0)
|
||||
|
||||
struct __RFC_STRUCT rfc_dataEntryGeneral_s {
|
||||
uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry
|
||||
uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to
|
||||
struct {
|
||||
uint8_t type:2; //!< \brief Type of data entry structure<br>
|
||||
//!< 0: General data entry <br>
|
||||
//!< 1: Multi-element Rx entry<br>
|
||||
//!< 2: Pointer entry<br>
|
||||
//!< 3: Partial read Rx entry
|
||||
uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element<br>
|
||||
//!< 0: No length indicator<br>
|
||||
//!< 1: One byte length indicator<br>
|
||||
//!< 2: Two bytes length indicator<br>
|
||||
//!< 3: <i>Reserved</i>
|
||||
uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated
|
||||
//!< by the radio CPU (0: 16 bytes)
|
||||
} config;
|
||||
uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to<br>
|
||||
//!< For other entries: Number of bytes following this length field
|
||||
uint8_t data; //!< First byte of the data array to be received or transmitted
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup dataEntryMulti
|
||||
//! @{
|
||||
//! Multi-element data entry structure (type = 1)
|
||||
|
||||
struct __RFC_STRUCT rfc_dataEntryMulti_s {
|
||||
uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry
|
||||
uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to
|
||||
struct {
|
||||
uint8_t type:2; //!< \brief Type of data entry structure<br>
|
||||
//!< 0: General data entry <br>
|
||||
//!< 1: Multi-element Rx entry<br>
|
||||
//!< 2: Pointer entry<br>
|
||||
//!< 3: Partial read Rx entry
|
||||
uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element<br>
|
||||
//!< 0: No length indicator<br>
|
||||
//!< 1: One byte length indicator<br>
|
||||
//!< 2: Two bytes length indicator<br>
|
||||
//!< 3: <i>Reserved</i>
|
||||
uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated
|
||||
//!< by the radio CPU (0: 16 bytes)
|
||||
} config;
|
||||
uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to<br>
|
||||
//!< For other entries: Number of bytes following this length field
|
||||
uint16_t numElements; //!< Number of entry elements committed in the entry
|
||||
uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU
|
||||
uint8_t rxData; //!< First byte of the data array of received data entry elements
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup dataEntryPointer
|
||||
//! @{
|
||||
//! Pointer data entry structure (type = 2)
|
||||
|
||||
struct __RFC_STRUCT rfc_dataEntryPointer_s {
|
||||
uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry
|
||||
uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to
|
||||
struct {
|
||||
uint8_t type:2; //!< \brief Type of data entry structure<br>
|
||||
//!< 0: General data entry <br>
|
||||
//!< 1: Multi-element Rx entry<br>
|
||||
//!< 2: Pointer entry<br>
|
||||
//!< 3: Partial read Rx entry
|
||||
uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element<br>
|
||||
//!< 0: No length indicator<br>
|
||||
//!< 1: One byte length indicator<br>
|
||||
//!< 2: Two bytes length indicator<br>
|
||||
//!< 3: <i>Reserved</i>
|
||||
uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated
|
||||
//!< by the radio CPU (0: 16 bytes)
|
||||
} config;
|
||||
uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to<br>
|
||||
//!< For other entries: Number of bytes following this length field
|
||||
uint8_t* pData; //!< Pointer to data buffer of data to be received ro transmitted
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup dataEntryPartial
|
||||
//! @{
|
||||
//! Partial read data entry structure (type = 3)
|
||||
|
||||
struct __RFC_STRUCT rfc_dataEntryPartial_s {
|
||||
uint8_t* pNextEntry; //!< Pointer to next entry in the queue, NULL if this is the last entry
|
||||
uint8_t status; //!< Indicates status of entry, including whether it is free for the system CPU to write to
|
||||
struct {
|
||||
uint8_t type:2; //!< \brief Type of data entry structure<br>
|
||||
//!< 0: General data entry <br>
|
||||
//!< 1: Multi-element Rx entry<br>
|
||||
//!< 2: Pointer entry<br>
|
||||
//!< 3: Partial read Rx entry
|
||||
uint8_t lenSz:2; //!< \brief Size of length word in start of each Rx entry element<br>
|
||||
//!< 0: No length indicator<br>
|
||||
//!< 1: One byte length indicator<br>
|
||||
//!< 2: Two bytes length indicator<br>
|
||||
//!< 3: <i>Reserved</i>
|
||||
uint8_t irqIntv:4; //!< \brief For partial read Rx entry only: The number of bytes between interrupt generated
|
||||
//!< by the radio CPU (0: 16 bytes)
|
||||
} config;
|
||||
uint16_t length; //!< \brief For pointer entries: Number of bytes in the data buffer pointed to<br>
|
||||
//!< For other entries: Number of bytes following this length field
|
||||
struct {
|
||||
uint16_t numElements:13; //!< Number of entry elements committed in the entry
|
||||
uint16_t bEntryOpen:1; //!< 1 if the entry contains an element that is still open for appending data
|
||||
uint16_t bFirstCont:1; //!< 1 if the first element is a continuation of the last packet from the previous entry
|
||||
uint16_t bLastCont:1; //!< 1 if the packet in the last element continues in the next entry
|
||||
} pktStatus;
|
||||
uint16_t nextIndex; //!< Index to the byte after the last byte of the last entry element committed by the radio CPU
|
||||
uint8_t rxData; //!< First byte of the data array of received data entry elements
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! @}
|
||||
//! @}
|
||||
#endif /* DATA_ENTRY_H_ */
|
|
@ -1,328 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Filename: mailbox.h
|
||||
* Revised: 2015-06-29 12:59:58 +0200 (Mon, 29 Jun 2015)
|
||||
* Revision: 44063
|
||||
*
|
||||
* Description: Definitions for interface between system and radio CPU
|
||||
*
|
||||
* Copyright (c) 2015, Texas Instruments Incorporated
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef MAILBOX_H_
|
||||
#define MAILBOX_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
/// Type definition for RAT
|
||||
typedef uint32_t ratmr_t;
|
||||
|
||||
|
||||
|
||||
/// Type definition for a data queue
|
||||
typedef struct {
|
||||
uint8_t *pCurrEntry; ///< Pointer to the data queue entry to be used, NULL for an empty queue
|
||||
uint8_t *pLastEntry; ///< Pointer to the last entry in the queue, NULL for a circular queue
|
||||
} dataQueue_t;
|
||||
|
||||
|
||||
|
||||
/// \name CPE interrupt definitions
|
||||
/// Interrupt masks for the CPE interrupt in RDBELL.
|
||||
///@{
|
||||
#define IRQN_COMMAND_DONE 0 ///< Radio operation command finished
|
||||
#define IRQN_LAST_COMMAND_DONE 1 ///< Last radio operation command in a chain finished
|
||||
#define IRQN_FG_COMMAND_DONE 2 ///< FG level Radio operation command finished
|
||||
#define IRQN_LAST_FG_COMMAND_DONE 3 ///< Last FG level radio operation command in a chain finished
|
||||
#define IRQN_TX_DONE 4 ///< Packet transmitted
|
||||
#define IRQN_TX_ACK 5 ///< ACK packet transmitted
|
||||
#define IRQN_TX_CTRL 6 ///< Control packet transmitted
|
||||
#define IRQN_TX_CTRL_ACK 7 ///< Acknowledgement received on a transmitted control packet
|
||||
#define IRQN_TX_CTRL_ACK_ACK 8 ///< Acknowledgement received on a transmitted control packet, and acknowledgement transmitted for that packet
|
||||
#define IRQN_TX_RETRANS 9 ///< Packet retransmitted
|
||||
#define IRQN_TX_ENTRY_DONE 10 ///< Tx queue data entry state changed to Finished
|
||||
#define IRQN_TX_BUFFER_CHANGED 11 ///< A buffer change is complete
|
||||
#define IRQN_RX_OK 16 ///< Packet received with CRC OK, payload, and not to be ignored
|
||||
#define IRQN_RX_NOK 17 ///< Packet received with CRC error
|
||||
#define IRQN_RX_IGNORED 18 ///< Packet received with CRC OK, but to be ignored
|
||||
#define IRQN_RX_EMPTY 19 ///< Packet received with CRC OK, not to be ignored, no payload
|
||||
#define IRQN_RX_CTRL 20 ///< Control packet received with CRC OK, not to be ignored
|
||||
#define IRQN_RX_CTRL_ACK 21 ///< Control packet received with CRC OK, not to be ignored, then ACK sent
|
||||
#define IRQN_RX_BUF_FULL 22 ///< Packet received that did not fit in the Rx queue
|
||||
#define IRQN_RX_ENTRY_DONE 23 ///< Rx queue data entry changing state to Finished
|
||||
#define IRQN_RX_DATA_WRITTEN 24 ///< Data written to partial read Rx buffer
|
||||
#define IRQN_RX_N_DATA_WRITTEN 25 ///< Specified number of bytes written to partial read Rx buffer
|
||||
#define IRQN_RX_ABORTED 26 ///< Packet reception stopped before packet was done
|
||||
#define IRQN_RX_COLLISION_DETECTED 27 ///< A collision was indicated during packet reception
|
||||
#define IRQN_SYNTH_NO_LOCK 28 ///< The synth has gone out of lock after calibration
|
||||
#define IRQN_MODULES_UNLOCKED 29 ///< As part of the boot process, the CM0 has opened access to RF core modules and memories
|
||||
#define IRQN_BOOT_DONE 30 ///< The RF core CPU boot is finished
|
||||
|
||||
#define IRQN_INTERNAL_ERROR 31 ///< Internal error observed
|
||||
|
||||
#define IRQ_COMMAND_DONE (1U << IRQN_COMMAND_DONE)
|
||||
#define IRQ_LAST_COMMAND_DONE (1U << IRQN_LAST_COMMAND_DONE)
|
||||
#define IRQ_FG_COMMAND_DONE (1U << IRQN_FG_COMMAND_DONE)
|
||||
#define IRQ_LAST_FG_COMMAND_DONE (1U << IRQN_LAST_FG_COMMAND_DONE)
|
||||
|
||||
#define IRQ_TX_DONE (1U << IRQN_TX_DONE)
|
||||
#define IRQ_TX_ACK (1U << IRQN_TX_ACK)
|
||||
#define IRQ_TX_CTRL (1U << IRQN_TX_CTRL)
|
||||
#define IRQ_TX_CTRL_ACK (1U << IRQN_TX_CTRL_ACK)
|
||||
#define IRQ_TX_CTRL_ACK_ACK (1U << IRQN_TX_CTRL_ACK_ACK)
|
||||
#define IRQ_TX_RETRANS (1U << IRQN_TX_RETRANS)
|
||||
|
||||
#define IRQ_TX_ENTRY_DONE (1U << IRQN_TX_ENTRY_DONE)
|
||||
#define IRQ_TX_BUFFER_CHANGED (1U << IRQN_TX_BUFFER_CHANGED)
|
||||
|
||||
#define IRQ_RX_OK (1U << IRQN_RX_OK)
|
||||
#define IRQ_RX_NOK (1U << IRQN_RX_NOK)
|
||||
#define IRQ_RX_IGNORED (1U << IRQN_RX_IGNORED)
|
||||
#define IRQ_RX_EMPTY (1U << IRQN_RX_EMPTY)
|
||||
#define IRQ_RX_CTRL (1U << IRQN_RX_CTRL)
|
||||
#define IRQ_RX_CTRL_ACK (1U << IRQN_RX_CTRL_ACK)
|
||||
#define IRQ_RX_BUF_FULL (1U << IRQN_RX_BUF_FULL)
|
||||
#define IRQ_RX_ENTRY_DONE (1U << IRQN_RX_ENTRY_DONE)
|
||||
#define IRQ_RX_DATA_WRITTEN (1U << IRQN_RX_DATA_WRITTEN)
|
||||
#define IRQ_RX_N_DATA_WRITTEN (1U << IRQN_RX_N_DATA_WRITTEN)
|
||||
#define IRQ_RX_ABORTED (1U << IRQN_RX_ABORTED)
|
||||
#define IRQ_RX_COLLISION_DETECTED (1U << IRQN_RX_COLLISION_DETECTED)
|
||||
#define IRQ_SYNTH_NO_LOCK (1U << IRQN_SYNTH_NO_LOCK)
|
||||
#define IRQ_MODULES_UNLOCKED (1U << IRQN_MODULES_UNLOCKED)
|
||||
#define IRQ_BOOT_DONE (1U << IRQN_BOOT_DONE)
|
||||
#define IRQ_INTERNAL_ERROR (1U << IRQN_INTERNAL_ERROR)
|
||||
///@}
|
||||
|
||||
|
||||
|
||||
/// \name CMDSTA values
|
||||
/// Values returned in result byte of CMDSTA
|
||||
///@{
|
||||
#define CMDSTA_Pending 0x00 ///< The command has not yet been parsed
|
||||
#define CMDSTA_Done 0x01 ///< Command successfully parsed
|
||||
|
||||
#define CMDSTA_IllegalPointer 0x81 ///< The pointer signalled in CMDR is not valid
|
||||
#define CMDSTA_UnknownCommand 0x82 ///< The command number in the command structure is unknown
|
||||
#define CMDSTA_UnknownDirCommand 0x83 ///< The command number for a direct command is unknown, or the
|
||||
///< command is not a direct command
|
||||
#define CMDSTA_ContextError 0x85 ///< An immediate or direct command was issued in a context
|
||||
///< where it is not supported
|
||||
#define CMDSTA_SchedulingError 0x86 ///< A radio operation command was attempted to be scheduled
|
||||
///< while another operation was already running in the RF core
|
||||
#define CMDSTA_ParError 0x87 ///< There were errors in the command parameters that are parsed
|
||||
///< on submission.
|
||||
#define CMDSTA_QueueError 0x88 ///< An operation on a data entry queue was attempted that was
|
||||
///< not supported by the queue in its current state
|
||||
#define CMDSTA_QueueBusy 0x89 ///< An operation on a data entry was attempted while that entry
|
||||
///< was busy
|
||||
///@}
|
||||
|
||||
|
||||
|
||||
/// \name Macros for sending direct commands
|
||||
///@{
|
||||
/// Direct command with no parameter
|
||||
#define CMDR_DIR_CMD(cmdId) (((cmdId) << 16) | 1)
|
||||
|
||||
/// Direct command with 1-byte parameter
|
||||
#define CMDR_DIR_CMD_1BYTE(cmdId, par) (((cmdId) << 16) | ((par) << 8) | 1)
|
||||
|
||||
/// Direct command with 2-byte parameter
|
||||
#define CMDR_DIR_CMD_2BYTE(cmdId, par) (((cmdId) << 16) | ((par) & 0xFFFC) | 1)
|
||||
|
||||
///@}
|
||||
|
||||
|
||||
|
||||
/// \name Definitions for trigger types
|
||||
///@{
|
||||
#define TRIG_NOW 0 ///< Triggers immediately
|
||||
#define TRIG_NEVER 1 ///< Never trigs
|
||||
#define TRIG_ABSTIME 2 ///< Trigs at an absolute time
|
||||
#define TRIG_REL_SUBMIT 3 ///< Trigs at a time relative to the command was submitted
|
||||
#define TRIG_REL_START 4 ///< Trigs at a time relative to the command started
|
||||
#define TRIG_REL_PREVSTART 5 ///< Trigs at a time relative to the previous command in the chain started
|
||||
#define TRIG_REL_FIRSTSTART 6 ///< Trigs at a time relative to the first command in the chain started
|
||||
#define TRIG_REL_PREVEND 7 ///< Trigs at a time relative to the previous command in the chain ended
|
||||
#define TRIG_REL_EVT1 8 ///< Trigs at a time relative to the context defined "Event 1"
|
||||
#define TRIG_REL_EVT2 9 ///< Trigs at a time relative to the context defined "Event 2"
|
||||
#define TRIG_EXTERNAL 10 ///< Trigs at an external event to the radio timer
|
||||
#define TRIG_PAST_BM 0x80 ///< Bitmask for setting pastTrig bit in order to trig immediately if
|
||||
///< trigger happened in the past
|
||||
///@}
|
||||
|
||||
|
||||
/// \name Definitions for conditional execution
|
||||
///@{
|
||||
#define COND_ALWAYS 0 ///< Always run next command (except in case of Abort)
|
||||
#define COND_NEVER 1 ///< Never run next command
|
||||
#define COND_STOP_ON_FALSE 2 ///< Run next command if this command returned True, stop if it returned
|
||||
///< False
|
||||
#define COND_STOP_ON_TRUE 3 ///< Stop if this command returned True, run next command if it returned
|
||||
///< False
|
||||
#define COND_SKIP_ON_FALSE 4 ///< Run next command if this command returned True, skip a number of
|
||||
///< commands if it returned False
|
||||
#define COND_SKIP_ON_TRUE 5 ///< Skip a number of commands if this command returned True, run next
|
||||
///< command if it returned False
|
||||
///@}
|
||||
|
||||
|
||||
|
||||
/// \name Radio operation status
|
||||
///@{
|
||||
/// \name Operation not finished
|
||||
///@{
|
||||
#define IDLE 0x0000 ///< Operation not started
|
||||
#define PENDING 0x0001 ///< Start of command is pending
|
||||
#define ACTIVE 0x0002 ///< Running
|
||||
#define SKIPPED 0x0003 ///< Operation skipped due to condition in another command
|
||||
///@}
|
||||
/// \name Operation finished normally
|
||||
///@{
|
||||
#define DONE_OK 0x0400 ///< Operation ended normally
|
||||
#define DONE_COUNTDOWN 0x0401 ///< Counter reached zero
|
||||
#define DONE_RXERR 0x0402 ///< Operation ended with CRC error
|
||||
#define DONE_TIMEOUT 0x0403 ///< Operation ended with timeout
|
||||
#define DONE_STOPPED 0x0404 ///< Operation stopped after CMD_STOP command
|
||||
#define DONE_ABORT 0x0405 ///< Operation aborted by CMD_ABORT command
|
||||
#define DONE_FAILED 0x0406 ///< Scheduled immediate command failed
|
||||
///@}
|
||||
/// \name Operation finished with error
|
||||
///@{
|
||||
#define ERROR_PAST_START 0x0800 ///< The start trigger occurred in the past
|
||||
#define ERROR_START_TRIG 0x0801 ///< Illegal start trigger parameter
|
||||
#define ERROR_CONDITION 0x0802 ///< Illegal condition for next operation
|
||||
#define ERROR_PAR 0x0803 ///< Error in a command specific parameter
|
||||
#define ERROR_POINTER 0x0804 ///< Invalid pointer to next operation
|
||||
#define ERROR_CMDID 0x0805 ///< Next operation has a command ID that is undefined or not a radio
|
||||
///< operation command
|
||||
#define ERROR_WRONG_BG 0x0806 ///< FG level command not compatible with running BG level command
|
||||
#define ERROR_NO_SETUP 0x0807 ///< Operation using Rx or Tx attempted without CMD_RADIO_SETUP
|
||||
#define ERROR_NO_FS 0x0808 ///< Operation using Rx or Tx attempted without frequency synth configured
|
||||
#define ERROR_SYNTH_PROG 0x0809 ///< Synthesizer calibration failed
|
||||
#define ERROR_TXUNF 0x080A ///< Tx underflow observed
|
||||
#define ERROR_RXOVF 0x080B ///< Rx overflow observed
|
||||
#define ERROR_NO_RX 0x080C ///< Attempted to access data from Rx when no such data was yet received
|
||||
#define ERROR_PENDING 0x080D ///< Command submitted in the future with another command at different level pending
|
||||
///@}
|
||||
///@}
|
||||
|
||||
|
||||
/// \name Data entry types
|
||||
///@{
|
||||
#define DATA_ENTRY_TYPE_GEN 0 ///< General type: Tx entry or single element Rx entry
|
||||
#define DATA_ENTRY_TYPE_MULTI 1 ///< Multi-element Rx entry type
|
||||
#define DATA_ENTRY_TYPE_PTR 2 ///< Pointer entry type
|
||||
#define DATA_ENTRY_TYPE_PARTIAL 3 ///< Partial read entry type
|
||||
///@
|
||||
|
||||
|
||||
/// \name Data entry statuses
|
||||
///@{
|
||||
#define DATA_ENTRY_PENDING 0 ///< Entry not yet used
|
||||
#define DATA_ENTRY_ACTIVE 1 ///< Entry in use by radio CPU
|
||||
#define DATA_ENTRY_BUSY 2 ///< Entry being updated
|
||||
#define DATA_ENTRY_FINISHED 3 ///< Radio CPU is finished accessing the entry
|
||||
#define DATA_ENTRY_UNFINISHED 4 ///< Radio CPU is finished accessing the entry, but packet could not be finished
|
||||
///@}
|
||||
|
||||
|
||||
|
||||
/// \name Macros for RF register override
|
||||
///@{
|
||||
/// Macro for ADI half-size value-mask combination
|
||||
#define ADI_VAL_MASK(addr, mask, value) \
|
||||
(((addr) & 1) ? (((mask) & 0x0F) | (((value) & 0x0F) << 4)) : \
|
||||
((((mask) & 0x0F) << 4) | ((value) & 0x0F)))
|
||||
/// 32-bit write of 16-bit value
|
||||
#define HW_REG_OVERRIDE(addr, val) ((((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(val) << 16))
|
||||
/// ADI register, full-size write
|
||||
#define ADI_REG_OVERRIDE(adiNo, addr, val) (2 | ((uint32_t)(val) << 16) | \
|
||||
(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31))
|
||||
/// 2 ADI registers, full-size write
|
||||
#define ADI_2REG_OVERRIDE(adiNo, addr, val, addr2, val2) \
|
||||
(2 | ((uint32_t)(val2) << 2) | (((addr2) & 0x3F) << 10) | ((uint32_t)(val) << 16) | \
|
||||
(((addr) & 0x3F) << 24) | (((adiNo) ? 1U : 0) << 31))
|
||||
/// ADI register, half-size read-modify-write
|
||||
#define ADI_HALFREG_OVERRIDE(adiNo, addr, mask, val) (2 | (ADI_VAL_MASK(addr, mask, val) << 16) | \
|
||||
(((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31))
|
||||
/// 2 ADI registers, half-size read-modify-write
|
||||
#define ADI_2HALFREG_OVERRIDE(adiNo, addr, mask, val, addr2, mask2, val2) \
|
||||
(2 | (ADI_VAL_MASK(addr2, mask2, val2) << 2) | (((addr2) & 0x3F) << 10) | \
|
||||
(ADI_VAL_MASK(addr, mask, val) << 16) | (((addr) & 0x3F) << 24) | (1U << 30) | (((adiNo) ? 1U : 0) << 31))
|
||||
|
||||
/// 16-bit SW register as defined in radio_par_def.txt
|
||||
#define SW_REG_OVERRIDE(cmd, field, val) (3 | ((_POSITION_##cmd##_##field) << 4) | ((uint32_t)(val) << 16))
|
||||
/// SW register as defined in radio_par_def.txt with added index (for use with registers > 16 bits).
|
||||
#define SW_REG_IND_OVERRIDE(cmd, field, offset, val) (3 | \
|
||||
(((_POSITION_##cmd##_##field) + ((offset) << 1)) << 4) | ((uint32_t)(val) << 16))
|
||||
/// 8-bit SW register as defined in radio_par_def.txt
|
||||
#define SW_REG_BYTE_OVERRIDE(cmd, field, val) (0x8003 | ((_POSITION_##cmd##_##field) << 4) | \
|
||||
((uint32_t)(val) << 16))
|
||||
/// Two 8-bit SW registers as defined in radio_par_def.txt; the one given by field and the next byte.
|
||||
#define SW_REG_2BYTE_OVERRIDE(cmd, field, val0, val1) (3 | (((_POSITION_##cmd##_##field) & 0xFFFE) << 4) | \
|
||||
(((uint32_t)(val0) << 16) & 0x00FF0000) | ((uint32_t)(val1) << 24))
|
||||
#define HW16_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | ((uint32_t)(length) << 16))
|
||||
#define HW32_ARRAY_OVERRIDE(addr, length) (1 | (((uintptr_t) (addr)) & 0xFFFC) | \
|
||||
((uint32_t)(length) << 16) | (1U << 30))
|
||||
#define ADI_ARRAY_OVERRIDE(adiNo, addr, bHalfSize, length) (1 | ((((addr) & 0x3F) << 2)) | \
|
||||
((!!(bHalfSize)) << 8) | ((!!(adiNo)) << 9) | ((uint32_t)(length) << 16) | (2U << 30))
|
||||
#define SW_ARRAY_OVERRIDE(cmd, firstfield, length) (1 | (((_POSITION_##cmd##_##firstfield)) << 2) | \
|
||||
((uint32_t)(length) << 16) | (3U << 30))
|
||||
#define MCE_RFE_OVERRIDE(bMceRam, mceRomBank, mceMode, bRfeRam, rfeRomBank, rfeMode) \
|
||||
(7 | ((!!(bMceRam)) << 8) | (((mceRomBank) & 0x07) << 9) | ((!!(bRfeRam)) << 12) | (((rfeRomBank) & 0x07) << 13) | \
|
||||
(((mceMode) & 0x00FF) << 16) | (((rfeMode) & 0x00FF) << 24))
|
||||
#define NEW_OVERRIDE_SEGMENT(address) (((((uintptr_t)(address)) & 0x03FFFFFC) << 6) | 0x000F | \
|
||||
(((((uintptr_t)(address) >> 24) == 0x20) ? 0x01 : \
|
||||
(((uintptr_t)(address) >> 24) == 0x21) ? 0x02 : \
|
||||
(((uintptr_t)(address) >> 24) == 0xA0) ? 0x03 : \
|
||||
(((uintptr_t)(address) >> 24) == 0x00) ? 0x04 : \
|
||||
(((uintptr_t)(address) >> 24) == 0x10) ? 0x05 : \
|
||||
(((uintptr_t)(address) >> 24) == 0x11) ? 0x06 : \
|
||||
(((uintptr_t)(address) >> 24) == 0x40) ? 0x07 : \
|
||||
(((uintptr_t)(address) >> 24) == 0x50) ? 0x08 : \
|
||||
0x09) << 4)) // Use illegal value for illegal address range
|
||||
/// End of string for override register
|
||||
#define END_OVERRIDE 0xFFFFFFFF
|
||||
|
||||
|
||||
/// ADI address-value pair
|
||||
#define ADI_ADDR_VAL(addr, value) ((((addr) & 0x7F) << 8) | ((value) & 0xFF))
|
||||
#define ADI_ADDR_VAL_MASK(addr, mask, value) ((((addr) & 0x7F) << 8) | ADI_VAL_MASK(addr, mask, value))
|
||||
|
||||
/// Low half-word
|
||||
#define LOWORD(value) ((value) & 0xFFFF)
|
||||
/// High half-word
|
||||
#define HIWORD(value) ((value) >> 16)
|
||||
///@}
|
||||
|
||||
|
||||
#endif /* MAILBOX_H_ */
|
|
@ -1,596 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Filename: prop_cmd.h
|
||||
* Revised: 2015-08-04 10:40:45 +0200 (Tue, 04 Aug 2015)
|
||||
* Revision: 44326
|
||||
*
|
||||
* Description: CC13xx API for Proprietary mode commands
|
||||
*
|
||||
* Copyright (c) 2015, Texas Instruments Incorporated
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef PROP_CMD_H_
|
||||
#define PROP_CMD_H_
|
||||
|
||||
#ifndef __RFC_STRUCT
|
||||
#ifdef __GNUC__
|
||||
#define __RFC_STRUCT __attribute__ ((aligned (4)))
|
||||
#else
|
||||
#define __RFC_STRUCT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//! \addtogroup rfc
|
||||
//! @{
|
||||
|
||||
//! \addtogroup prop_cmd
|
||||
//! @{
|
||||
|
||||
#include <stdint.h>
|
||||
#include "mailbox.h"
|
||||
#include "common_cmd.h"
|
||||
|
||||
typedef struct __RFC_STRUCT rfc_carrierSense_s rfc_carrierSense_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_TX_s rfc_CMD_PROP_TX_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_RX_s rfc_CMD_PROP_RX_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s rfc_CMD_PROP_TX_ADV_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s rfc_CMD_PROP_RX_ADV_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s rfc_CMD_PROP_RADIO_SETUP_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s rfc_CMD_PROP_RADIO_DIV_SETUP_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s rfc_CMD_PROP_SET_LEN_t;
|
||||
typedef struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s rfc_CMD_PROP_RESTART_RX_t;
|
||||
typedef struct __RFC_STRUCT rfc_propRxOutput_s rfc_propRxOutput_t;
|
||||
typedef struct __RFC_STRUCT rfc_propRxStatus_s rfc_propRxStatus_t;
|
||||
|
||||
//! \addtogroup carrierSense
|
||||
//! @{
|
||||
struct __RFC_STRUCT rfc_carrierSense_s {
|
||||
struct {
|
||||
uint8_t bEnaRssi:1; //!< If 1, enable RSSI as a criterion
|
||||
uint8_t bEnaCorr:1; //!< If 1, enable correlation as a criterion
|
||||
uint8_t operation:1; //!< \brief 0: Busy if either RSSI or correlation indicates Busy<br>
|
||||
//!< 1: Busy if both RSSI and correlation indicates Busy
|
||||
uint8_t busyOp:1; //!< \brief 0: Continue carrier sense on channel Busy<br>
|
||||
//!< 1: End carrier sense on channel Busy<br>
|
||||
//!< For an Rx command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle
|
||||
uint8_t idleOp:1; //!< \brief 0: Continue on channel Idle<br>
|
||||
//!< 1: End on channel Idle
|
||||
uint8_t timeoutRes:1; //!< \brief 0: Timeout with channel state Invalid treated as Busy<br>
|
||||
//!< 1: Timeout with channel state Invalid treated as Idle
|
||||
} csConf;
|
||||
int8_t rssiThr; //!< RSSI threshold
|
||||
uint8_t numRssiIdle; //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is
|
||||
//!< declared Idle
|
||||
uint8_t numRssiBusy; //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is
|
||||
//!< declared Busy
|
||||
uint16_t corrPeriod; //!< Number of RAT ticks for a correlation observation periods
|
||||
struct {
|
||||
uint8_t numCorrInv:4; //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
|
||||
//!< ticks between them needed to go from Idle to Invalid
|
||||
uint8_t numCorrBusy:4; //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
|
||||
//!< ticks between them needed to go from Invalid to Busy
|
||||
} corrConfig;
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} csEndTrigger; //!< Trigger classifier for ending the carrier sense
|
||||
ratmr_t csEndTime; //!< Time used together with <code>csEndTrigger</code> for ending the operation
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_TX
|
||||
//! @{
|
||||
#define CMD_PROP_TX 0x3801
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_TX_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3801
|
||||
uint16_t status; //!< \brief An integer telling the status of the command. This value is
|
||||
//!< updated by the radio CPU during operation and may be read by the
|
||||
//!< system CPU at any time.
|
||||
rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done
|
||||
ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>)
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} startTrigger; //!< Identification of the trigger that starts the operation
|
||||
struct {
|
||||
uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed
|
||||
uint8_t nSkip:4; //!< Number of skips if the rule involves skipping
|
||||
} condition;
|
||||
struct {
|
||||
uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command<br>
|
||||
//!< 1: Turn frequency synth off after command
|
||||
uint8_t :2;
|
||||
uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC<br>
|
||||
//!< 1: Append CRC
|
||||
uint8_t bVarLen:1; //!< \brief 0: Fixed length<br>
|
||||
//!< 1: Transmit length as first byte
|
||||
} pktConf;
|
||||
uint8_t pktLen; //!< Packet length
|
||||
uint32_t syncWord; //!< Sync word to transmit
|
||||
uint8_t* pPkt; //!< Pointer to packet
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_RX
|
||||
//! @{
|
||||
#define CMD_PROP_RX 0x3802
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_RX_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3802
|
||||
uint16_t status; //!< \brief An integer telling the status of the command. This value is
|
||||
//!< updated by the radio CPU during operation and may be read by the
|
||||
//!< system CPU at any time.
|
||||
rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done
|
||||
ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>)
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} startTrigger; //!< Identification of the trigger that starts the operation
|
||||
struct {
|
||||
uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed
|
||||
uint8_t nSkip:4; //!< Number of skips if the rule involves skipping
|
||||
} condition;
|
||||
struct {
|
||||
uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command<br>
|
||||
//!< 1: Turn frequency synth off after command
|
||||
uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly<br>
|
||||
//!< 1: Go back to sync search after receiving a packet correctly
|
||||
uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error<br>
|
||||
//!< 1: Go back to sync search after receiving a packet with CRC error
|
||||
uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC<br>
|
||||
//!< 1: Check CRC
|
||||
uint8_t bVarLen:1; //!< \brief 0: Fixed length<br>
|
||||
//!< 1: Receive length as first byte
|
||||
uint8_t bChkAddress:1; //!< \brief 0: No address check<br>
|
||||
//!< 1: Check address
|
||||
uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained<br>
|
||||
//!< 1: Packet reception is stopped if end trigger happens
|
||||
uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch<br>
|
||||
//!< 1: Receive packet and mark it as ignored on address mismatch
|
||||
} pktConf;
|
||||
struct {
|
||||
uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from Rx queue
|
||||
uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from Rx queue
|
||||
uint8_t :1;
|
||||
uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it
|
||||
uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it
|
||||
uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue
|
||||
uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue
|
||||
uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue
|
||||
} rxConf; //!< Rx configuration
|
||||
uint32_t syncWord; //!< Sync word to listen for
|
||||
uint8_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length<br>
|
||||
//!< 0: Unlimited or unknown length
|
||||
uint8_t address0; //!< Address
|
||||
uint8_t address1; //!< \brief Address (set equal to <code>address0</code> to accept only one address. If 0xFF, accept
|
||||
//!< 0x00 as well)
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} endTrigger; //!< Trigger classifier for ending the operation
|
||||
ratmr_t endTime; //!< Time used together with <code>endTrigger</code> for ending the operation
|
||||
dataQueue_t* pQueue; //!< Pointer to receive queue
|
||||
uint8_t* pOutput; //!< Pointer to output structure
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_TX_ADV
|
||||
//! @{
|
||||
#define CMD_PROP_TX_ADV 0x3803
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3803
|
||||
uint16_t status; //!< \brief An integer telling the status of the command. This value is
|
||||
//!< updated by the radio CPU during operation and may be read by the
|
||||
//!< system CPU at any time.
|
||||
rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done
|
||||
ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>)
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} startTrigger; //!< Identification of the trigger that starts the operation
|
||||
struct {
|
||||
uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed
|
||||
uint8_t nSkip:4; //!< Number of skips if the rule involves skipping
|
||||
} condition;
|
||||
struct {
|
||||
uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command<br>
|
||||
//!< 1: Turn frequency synth off after command
|
||||
uint8_t :2;
|
||||
uint8_t bUseCrc:1; //!< \brief 0: Do not append CRC<br>
|
||||
//!< 1: Append CRC
|
||||
uint8_t bCrcIncSw:1; //!< \brief 0:Do not include sync word in CRC calculation<br>
|
||||
//!< 1: Include sync word in CRC calculation
|
||||
uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation<br>
|
||||
//!< 1: Include header in CRC calculation
|
||||
} pktConf;
|
||||
uint8_t numHdrBits; //!< Number of bits in header (0–32)
|
||||
uint16_t pktLen; //!< Packet length. 0: Unlimited
|
||||
struct {
|
||||
uint8_t bExtTxTrig:1; //!< \brief 0: Start packet on a fixed time from the command start trigger<br>
|
||||
//!< 1: Start packet on an external trigger (input event to RAT)
|
||||
uint8_t inputMode:2; //!< \brief Input mode if external trigger is used for Tx start<br>
|
||||
//!< 0: Rising edge<br>
|
||||
//!< 1: Falling edge<br>
|
||||
//!< 2: Both edges<br>
|
||||
//!< 3: <i>Reserved</i>
|
||||
uint8_t source:5; //!< RAT input event number used for capture if external trigger is used for Tx start
|
||||
} startConf;
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} preTrigger; //!< Trigger for transition from preamble to sync word
|
||||
ratmr_t preTime; //!< \brief Time used together with <code>preTrigger</code> for transition from preamble to sync
|
||||
//!< word. If <code>preTrigger.triggerType</code> is set to "now", one preamble as
|
||||
//!< configured in the setup will be sent. Otherwise, the preamble will be repeated until
|
||||
//!< this trigger is observed.
|
||||
uint32_t syncWord; //!< Sync word to transmit
|
||||
uint8_t* pPkt; //!< Pointer to packet, or Tx queue for unlimited length
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_RX_ADV
|
||||
//! @{
|
||||
#define CMD_PROP_RX_ADV 0x3804
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3804
|
||||
uint16_t status; //!< \brief An integer telling the status of the command. This value is
|
||||
//!< updated by the radio CPU during operation and may be read by the
|
||||
//!< system CPU at any time.
|
||||
rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done
|
||||
ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>)
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} startTrigger; //!< Identification of the trigger that starts the operation
|
||||
struct {
|
||||
uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed
|
||||
uint8_t nSkip:4; //!< Number of skips if the rule involves skipping
|
||||
} condition;
|
||||
struct {
|
||||
uint8_t bFsOff:1; //!< \brief 0: Keep frequency synth on after command<br>
|
||||
//!< 1: Turn frequency synth off after command
|
||||
uint8_t bRepeatOk:1; //!< \brief 0: End operation after receiving a packet correctly<br>
|
||||
//!< 1: Go back to sync search after receiving a packet correctly
|
||||
uint8_t bRepeatNok:1; //!< \brief 0: End operation after receiving a packet with CRC error<br>
|
||||
//!< 1: Go back to sync search after receiving a packet with CRC error
|
||||
uint8_t bUseCrc:1; //!< \brief 0: Do not check CRC<br>
|
||||
//!< 1: Check CRC
|
||||
uint8_t bCrcIncSw:1; //!< \brief 0: Do not include sync word in CRC calculation<br>
|
||||
//!< 1: Include sync word in CRC calculation
|
||||
uint8_t bCrcIncHdr:1; //!< \brief 0: Do not include header in CRC calculation <br>
|
||||
//!< 1: Include header in CRC calculation
|
||||
uint8_t endType:1; //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained<br>
|
||||
//!< 1: Packet reception is stopped if end trigger happens
|
||||
uint8_t filterOp:1; //!< \brief 0: Stop receiver and restart sync search on address mismatch<br>
|
||||
//!< 1: Receive packet and mark it as ignored on address mismatch
|
||||
} pktConf;
|
||||
struct {
|
||||
uint8_t bAutoFlushIgnored:1; //!< If 1, automatically discard ignored packets from Rx queue
|
||||
uint8_t bAutoFlushCrcErr:1; //!< If 1, automatically discard packets with CRC error from Rx queue
|
||||
uint8_t :1;
|
||||
uint8_t bIncludeHdr:1; //!< If 1, include the received header or length byte in the stored packet; otherwise discard it
|
||||
uint8_t bIncludeCrc:1; //!< If 1, include the received CRC field in the stored packet; otherwise discard it
|
||||
uint8_t bAppendRssi:1; //!< If 1, append an RSSI byte to the packet in the Rx queue
|
||||
uint8_t bAppendTimestamp:1; //!< If 1, append a timestamp to the packet in the Rx queue
|
||||
uint8_t bAppendStatus:1; //!< If 1, append a status byte to the packet in the Rx queue
|
||||
} rxConf; //!< Rx configuration
|
||||
uint32_t syncWord0; //!< Sync word to listen for
|
||||
uint32_t syncWord1; //!< Alternative sync word if non-zero
|
||||
uint16_t maxPktLen; //!< \brief Packet length for fixed length, maximum packet length for variable length<br>
|
||||
//!< 0: Unlimited or unknown length
|
||||
struct {
|
||||
uint16_t numHdrBits:6; //!< Number of bits in header (0–32)
|
||||
uint16_t lenPos:5; //!< Position of length field in header (0–31)
|
||||
uint16_t numLenBits:5; //!< Number of bits in length field (0–16)
|
||||
} hdrConf;
|
||||
struct {
|
||||
uint16_t addrType:1; //!< \brief 0: Address after header<br>
|
||||
//!< 1: Address in header
|
||||
uint16_t addrSize:5; //!< \brief If <code>addrType</code> = 0: Address size in bytes<br>
|
||||
//!< If <code>addrType</code> = 1: Address size in bits
|
||||
uint16_t addrPos:5; //!< \brief If <code>addrType</code> = 1: Bit position of address in header<br>
|
||||
//!< If <code>addrType</code> = 0: Non-zero to extend address with sync word identifier
|
||||
uint16_t numAddr:5; //!< Number of addresses in address list
|
||||
} addrConf;
|
||||
int8_t lenOffset; //!< Signed value to add to length field
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} endTrigger; //!< Trigger classifier for ending the operation
|
||||
ratmr_t endTime; //!< Time used together with <code>endTrigger</code> for ending the operation
|
||||
uint8_t* pAddr; //!< Pointer to address list
|
||||
dataQueue_t* pQueue; //!< Pointer to receive queue
|
||||
uint8_t* pOutput; //!< Pointer to output structure
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_RADIO_SETUP
|
||||
//! @{
|
||||
#define CMD_PROP_RADIO_SETUP 0x3806
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3806
|
||||
uint16_t status; //!< \brief An integer telling the status of the command. This value is
|
||||
//!< updated by the radio CPU during operation and may be read by the
|
||||
//!< system CPU at any time.
|
||||
rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done
|
||||
ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>)
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} startTrigger; //!< Identification of the trigger that starts the operation
|
||||
struct {
|
||||
uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed
|
||||
uint8_t nSkip:4; //!< Number of skips if the rule involves skipping
|
||||
} condition;
|
||||
struct {
|
||||
uint16_t modType:3; //!< \brief 0: FSK<br>
|
||||
//!< 1: GFSK<br>
|
||||
//!< Others: <i>Reserved</i>
|
||||
uint16_t deviation:13; //!< Deviation (250 Hz steps)
|
||||
} modulation;
|
||||
struct {
|
||||
uint32_t preScale:4; //!< Prescaler value
|
||||
uint32_t :4;
|
||||
uint32_t rateWord:21; //!< Rate word
|
||||
} symbolRate;
|
||||
uint8_t rxBw; //!< Receiver bandwidth
|
||||
struct {
|
||||
uint8_t nPreamBytes:6; //!< \brief 0–30: Number of preamble bytes<br>
|
||||
//!< 31: 4 preamble bits
|
||||
uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit<br>
|
||||
//!< 1: Send 1 as the first preamble bit<br>
|
||||
//!< 2: Send same first bit in preamble and sync word<br>
|
||||
//!< 3: Send different first bit in preamble and sync word
|
||||
} preamConf;
|
||||
struct {
|
||||
uint16_t nSwBits:6; //!< Number of sync word bits (up to 32)
|
||||
uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1<br>
|
||||
//!< 1: Use positive deviation for 0
|
||||
uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first<br>
|
||||
//!< 1: Most significant bit transmitted first
|
||||
uint16_t fecMode:4; //!< \brief Select coding<br>
|
||||
//!< 0: Uncoded binary modulation<br>
|
||||
//!< 10: Manchester coded binary modulation<br>
|
||||
//!< Others: <i>Reserved</i>
|
||||
uint16_t :1;
|
||||
uint16_t whitenMode:3; //!< \brief 0: No whitening<br>
|
||||
//!< 1: CC1101/CC2500 compatible whitening<br>
|
||||
//!< 2: PN9 whitening without byte reversal<br>
|
||||
//!< 3: <i>Reserved</i><br>
|
||||
//!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC<br>
|
||||
//!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC<br>
|
||||
//!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC<br>
|
||||
//!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC
|
||||
} formatConf;
|
||||
struct {
|
||||
uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode<br>
|
||||
//!< 0x01: Single-ended mode RFP<br>
|
||||
//!< 0x02: Single-ended mode RFN<br>
|
||||
//!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
|
||||
//!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
|
||||
//!< Others: <i>Reserved</i>
|
||||
uint16_t biasMode:1; //!< \brief 0: Internal bias<br>
|
||||
//!< 1: External bias
|
||||
uint16_t :6;
|
||||
uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth<br>
|
||||
//!< 1: Do not power up frequency synth
|
||||
} config; //!< Configuration options
|
||||
uint16_t txPower; //!< Transmit power
|
||||
uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
|
||||
//!< override is used.
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_RADIO_DIV_SETUP
|
||||
//! @{
|
||||
#define CMD_PROP_RADIO_DIV_SETUP 0x3807
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3807
|
||||
uint16_t status; //!< \brief An integer telling the status of the command. This value is
|
||||
//!< updated by the radio CPU during operation and may be read by the
|
||||
//!< system CPU at any time.
|
||||
rfc_radioOp_t *pNextOp; //!< Pointer to the next operation to run after this operation is done
|
||||
ratmr_t startTime; //!< Absolute or relative start time (depending on the value of <code>startTrigger</code>)
|
||||
struct {
|
||||
uint8_t triggerType:4; //!< The type of trigger
|
||||
uint8_t bEnaCmd:1; //!< \brief 0: No alternative trigger command<br>
|
||||
//!< 1: CMD_TRIGGER can be used as an alternative trigger
|
||||
uint8_t triggerNo:2; //!< The trigger number of the CMD_TRIGGER command that triggers this action
|
||||
uint8_t pastTrig:1; //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
|
||||
//!< 1: A trigger in the past is triggered as soon as possible
|
||||
} startTrigger; //!< Identification of the trigger that starts the operation
|
||||
struct {
|
||||
uint8_t rule:4; //!< Condition for running next command: Rule for how to proceed
|
||||
uint8_t nSkip:4; //!< Number of skips if the rule involves skipping
|
||||
} condition;
|
||||
struct {
|
||||
uint16_t modType:3; //!< \brief 0: FSK<br>
|
||||
//!< 1: GFSK<br>
|
||||
//!< Others: <i>Reserved</i>
|
||||
uint16_t deviation:13; //!< Deviation (250 Hz steps)
|
||||
} modulation;
|
||||
struct {
|
||||
uint32_t preScale:4; //!< Prescaler value
|
||||
uint32_t :4;
|
||||
uint32_t rateWord:21; //!< Rate word
|
||||
} symbolRate;
|
||||
uint8_t rxBw; //!< Receiver bandwidth
|
||||
struct {
|
||||
uint8_t nPreamBytes:6; //!< \brief 0–30: Number of preamble bytes<br>
|
||||
//!< 31: 4 preamble bits
|
||||
uint8_t preamMode:2; //!< \brief 0: Send 0 as the first preamble bit<br>
|
||||
//!< 1: Send 1 as the first preamble bit<br>
|
||||
//!< 2: Send same first bit in preamble and sync word<br>
|
||||
//!< 3: Send different first bit in preamble and sync word
|
||||
} preamConf;
|
||||
struct {
|
||||
uint16_t nSwBits:6; //!< Number of sync word bits (up to 32)
|
||||
uint16_t bBitReversal:1; //!< \brief 0: Use positive deviation for 1<br>
|
||||
//!< 1: Use positive deviation for 0
|
||||
uint16_t bMsbFirst:1; //!< \brief 0: Least significant bit transmitted first<br>
|
||||
//!< 1: Most significant bit transmitted first
|
||||
uint16_t fecMode:4; //!< \brief Select coding<br>
|
||||
//!< 0: Uncoded binary modulation<br>
|
||||
//!< 10: Manchester coded binary modulation<br>
|
||||
//!< Others: <i>Reserved</i>
|
||||
uint16_t :1;
|
||||
uint16_t whitenMode:3; //!< \brief 0: No whitening<br>
|
||||
//!< 1: CC1101/CC2500 compatible whitening<br>
|
||||
//!< 2: PN9 whitening without byte reversal<br>
|
||||
//!< 3: <i>Reserved</i><br>
|
||||
//!< 4: No whitener, 32-bit IEEE 802.15.4g compatible CRC<br>
|
||||
//!< 5: IEEE 802.15.4g compatible whitener and 32-bit CRC<br>
|
||||
//!< 6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC<br>
|
||||
//!< 7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC
|
||||
} formatConf;
|
||||
struct {
|
||||
uint16_t frontEndMode:3; //!< \brief 0x00: Differential mode<br>
|
||||
//!< 0x01: Single-ended mode RFP<br>
|
||||
//!< 0x02: Single-ended mode RFN<br>
|
||||
//!< 0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
|
||||
//!< 0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
|
||||
//!< Others: <i>Reserved</i>
|
||||
uint16_t biasMode:1; //!< \brief 0: Internal bias<br>
|
||||
//!< 1: External bias
|
||||
uint16_t :6;
|
||||
uint16_t bNoFsPowerUp:1; //!< \brief 0: Power up frequency synth<br>
|
||||
//!< 1: Do not power up frequency synth
|
||||
} config; //!< Configuration options
|
||||
uint16_t txPower; //!< Transmit power
|
||||
uint32_t* pRegOverride; //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
|
||||
//!< override is used.
|
||||
uint16_t centerFreq; //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal Tx and Rx parameters.
|
||||
//!< For a single channel RF system, this should be set equal to the RF frequency used.
|
||||
//!< For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal
|
||||
//!< to the center frequency of the frequency band used.
|
||||
int16_t intFreq; //!< \brief Intermediate frequency to use for Rx, in MHz on 4.12 signed format. Tx will use same
|
||||
//!< intermediate frequency if supported, otherwise 0.<br>
|
||||
//!< 0x8000: Use default.
|
||||
uint8_t loDivider; //!< LO frequency divider setting to use. Supported values: 2, 5, 6, 10, 12, 15, and 30
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_SET_LEN
|
||||
//! @{
|
||||
#define CMD_PROP_SET_LEN 0x3401
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3401
|
||||
uint16_t rxLen; //!< Payload length to use
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup CMD_PROP_RESTART_RX
|
||||
//! @{
|
||||
#define CMD_PROP_RESTART_RX 0x3402
|
||||
struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s {
|
||||
uint16_t commandNo; //!< The command ID number 0x3402
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup propRxOutput
|
||||
//! @{
|
||||
//! Output structure for Rx operations
|
||||
|
||||
struct __RFC_STRUCT rfc_propRxOutput_s {
|
||||
uint16_t nRxOk; //!< Number of packets that have been received with payload, CRC OK and not ignored
|
||||
uint16_t nRxNok; //!< Number of packets that have been received with CRC error
|
||||
uint8_t nRxIgnored; //!< Number of packets that have been received with CRC OK and ignored due to address mismatch
|
||||
uint8_t nRxStopped; //!< Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1
|
||||
uint8_t nRxBufFull; //!< Number of packets that have been received and discarded due to lack of buffer space
|
||||
int8_t lastRssi; //!< RSSI of last received packet
|
||||
ratmr_t timeStamp; //!< Time stamp of last received packet
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! \addtogroup propRxStatus
|
||||
//! @{
|
||||
//! Receive status byte that may be appended to message in receive buffer
|
||||
|
||||
struct __RFC_STRUCT rfc_propRxStatus_s {
|
||||
struct {
|
||||
uint8_t addressInd:5; //!< Index of address found (0 if not applicable)
|
||||
uint8_t syncWordId:1; //!< 0 for primary sync word, 1 for alternate sync word
|
||||
uint8_t result:2; //!< \brief 0: Packet received correctly, not ignored<br>
|
||||
//!< 1: Packet received with CRC error<br>
|
||||
//!< 2: Packet received correctly, but can be ignored<br>
|
||||
//!< 3: Packet reception was aborted
|
||||
} status;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
//! @}
|
||||
//! @}
|
||||
#endif /* PROP_CMD_H_ */
|
|
@ -1,71 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Filename: prop_mailbox.h
|
||||
* Revised: 2015-06-29 12:59:58 +0200 (Mon, 29 Jun 2015)
|
||||
* Revision: 44063
|
||||
*
|
||||
* Description: Definitions for proprietary mode radio interface
|
||||
*
|
||||
* Copyright (c) 2015, Texas Instruments Incorporated
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1) Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2) Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef PROP_MAILBOX_H_
|
||||
#define PROP_MAILBOX_H_
|
||||
|
||||
/// \name Radio operation status
|
||||
///@{
|
||||
/// \name Operation finished normally
|
||||
///@{
|
||||
#define PROP_DONE_OK 0x3400 ///< Operation ended normally
|
||||
#define PROP_DONE_RXTIMEOUT 0x3401 ///< Operation stopped after end trigger while waiting for sync
|
||||
#define PROP_DONE_BREAK 0x3402 ///< Rx stopped due to time out in the middle of a packet
|
||||
#define PROP_DONE_ENDED 0x3403 ///< Operation stopped after end trigger during reception
|
||||
#define PROP_DONE_STOPPED 0x3404 ///< Operation stopped after stop command
|
||||
#define PROP_DONE_ABORT 0x3405 ///< Operation aborted by abort command
|
||||
#define PROP_DONE_RXERR 0x3406 ///< Operation ended after receiving packet with CRC error
|
||||
#define PROP_DONE_IDLE 0x3407 ///< Carrier sense operation ended because of idle channel
|
||||
#define PROP_DONE_BUSY 0x3408 ///< Carrier sense operation ended because of busy channel
|
||||
#define PROP_DONE_IDLETIMEOUT 0x3409 ///< Carrier sense operation ended because of time out with csConf.timeoutRes = 1
|
||||
#define PROP_DONE_BUSYTIMEOUT 0x340A ///< Carrier sense operation ended because of time out with csConf.timeoutRes = 0
|
||||
|
||||
///@}
|
||||
/// \name Operation finished with error
|
||||
///@{
|
||||
#define PROP_ERROR_PAR 0x3800 ///< Illegal parameter
|
||||
#define PROP_ERROR_RXBUF 0x3801 ///< No available Rx buffer at the start of a packet
|
||||
#define PROP_ERROR_RXFULL 0x3802 ///< Out of Rx buffer during reception in a partial read buffer
|
||||
#define PROP_ERROR_NO_SETUP 0x3803 ///< Radio was not set up in proprietary mode
|
||||
#define PROP_ERROR_NO_FS 0x3804 ///< Synth was not programmed when running Rx or Tx
|
||||
#define PROP_ERROR_RXOVF 0x3805 ///< Rx overflow observed during operation
|
||||
#define PROP_ERROR_TXUNF 0x3806 ///< Tx underflow observed during operation
|
||||
///@}
|
||||
///@}
|
||||
|
||||
#endif /* PROP_MAILBOX_H_ */
|
Loading…
Reference in a new issue