39 #define PAL_BB_154_MIN_RX_BUF_CNT 2 40 #define PAL_BB_154_RX_BUF_CNT 2 76 PAL_BB_154_ADDR_MODE_NONE = 0,
77 PAL_BB_154_ADDR_MODE_SHORT = 2,
78 PAL_BB_154_ADDR_MODE_EXTENDED = 3
89 PAL_BB_154_FRAME_TYPE_BEACON = 0,
90 PAL_BB_154_FRAME_TYPE_DATA = 1,
91 PAL_BB_154_FRAME_TYPE_ACKNOWLEDGMENT = 2,
92 PAL_BB_154_FRAME_TYPE_MAC_COMMAND = 3,
93 PAL_BB_154_FRAME_TYPE_ILLEGAL4 = 4,
94 PAL_BB_154_FRAME_TYPE_ILLEGAL5 = 5,
95 PAL_BB_154_FRAME_TYPE_ILLEGAL6 = 6,
96 PAL_BB_154_FRAME_TYPE_ILLEGAL7 = 7
107 PAL_BB_154_CMD_FRAME_TYPE_ASSOC_REQ = 1,
108 PAL_BB_154_CMD_FRAME_TYPE_ASSOC_RSP = 2,
109 PAL_BB_154_CMD_FRAME_TYPE_DISASSOC_NTF = 3,
110 PAL_BB_154_CMD_FRAME_TYPE_DATA_REQ = 4,
111 PAL_BB_154_CMD_FRAME_TYPE_PANID_CNFL_NTF = 5,
112 PAL_BB_154_CMD_FRAME_TYPE_ORPHAN_NTF = 6,
113 PAL_BB_154_CMD_FRAME_TYPE_BEACON_REQ = 7,
114 PAL_BB_154_CMD_FRAME_TYPE_COORD_REALIGN = 8,
115 PAL_BB_154_CMD_FRAME_TYPE_GTS_REQ = 9
127 #define PAL_BB_154_BROADCAST_PANID 0xffff 128 #define PAL_BB_154_BROADCAST_ADDR 0xffff 129 #define PAL_BB_154_UNASSIGNED_ADDR 0xffff 130 #define PAL_BB_154_NO_SHT_ADDR 0xfffe 131 #define PAL_BB_154_UNASSIGNED_PAN_ID 0xffff 134 #define PAL_BB_154_SHORT_ADDR_LEN 2 135 #define PAL_BB_154_EXTENDED_ADDR_LEN 8 138 #define PAL_BB_154_FLAG_TX_RX_AUTO_ACK (PAL_BB_154_FLAG_TX_AUTO_RX_ACK | PAL_BB_154_FLAG_RX_AUTO_TX_ACK) 141 #define PAL_BB_154_SYMB_TO_US(x) ((x) * 16) 142 #define PAL_BB_154_SYMB_TO_MS(x) (((x) * 16) / 1000) 143 #define PAL_BB_154_US_TO_SYMB(x) ((x) / 16) 146 #define PAL_BB_154_TPT_TO_MS(x) (((x) * 15723) >> 10) 149 #define PAL_BB_154_ED_THRESHOLD -75 157 #define PAL_BB_154_FRAME_CONTROL_LEN 2 160 #define PAL_BB_154_FCS_LEN 2 163 #define PAL_BB_154_FCS_INIT_VALUE 0x0000 166 #define PAL_BB_154_FC_FRAME_TYPE_SHIFT 0 167 #define PAL_BB_154_FC_FRAME_TYPE_MASK 0x0007 168 #define PAL_BB_154_FC_FRAME_TYPE_CD_MASK 0x0001 169 #define PAL_BB_154_FC_FRAME_TYPE_CMD_MASK 0x0003 170 #define PAL_BB_154_FC_FRAME_TYPE(x) (((x) & PAL_BB_154_FC_FRAME_TYPE_MASK)) 172 #define PAL_BB_154_FC_SECURITY_ENABLED_SHIFT 3 173 #define PAL_BB_154_FC_SECURITY_ENABLED_MASK 0x0008 174 #define PAL_BB_154_FC_SECURITY_ENABLED(x) (((x) & PAL_BB_154_FC_SECURITY_ENABLED_MASK) >> PAL_BB_154_FC_SECURITY_ENABLED_SHIFT) 176 #define PAL_BB_154_FC_FRAME_PENDING_SHIFT 4 177 #define PAL_BB_154_FC_FRAME_PENDING_MASK 0x0010 178 #define PAL_BB_154_FC_FRAME_PENDING(x) (((x) & PAL_BB_154_FC_FRAME_PENDING_MASK) >> PAL_BB_154_FC_FRAME_PENDING_SHIFT) 180 #define PAL_BB_154_FC_ACK_REQUEST_SHIFT 5 181 #define PAL_BB_154_FC_ACK_REQUEST_MASK 0x0020 182 #define PAL_BB_154_FC_ACK_REQUEST(x) (((x) & PAL_BB_154_FC_ACK_REQUEST_MASK) >> PAL_BB_154_FC_ACK_REQUEST_SHIFT) 184 #define PAL_BB_154_FC_PAN_ID_COMP_SHIFT 6 185 #define PAL_BB_154_FC_PAN_ID_COMP_MASK 0x0040 186 #define PAL_BB_154_FC_PAN_ID_COMP(x) (((x) & PAL_BB_154_FC_PAN_ID_COMP_MASK) >> PAL_BB_154_FC_PAN_ID_COMP_SHIFT) 188 #define PAL_BB_154_FC_DST_ADDR_MODE_SHIFT 10 189 #define PAL_BB_154_FC_DST_ADDR_MODE_MASK 0x0C00 190 #define PAL_BB_154_FC_DST_ADDR_MODE(x) (((x) & PAL_BB_154_FC_DST_ADDR_MODE_MASK) >> PAL_BB_154_FC_DST_ADDR_MODE_SHIFT) 192 #define PAL_BB_154_FC_FRAME_VERSION_SHIFT 12 193 #define PAL_BB_154_FC_FRAME_VERSION_MASK 0x3000 194 #define PAL_BB_154_FC_FRAME_VERSION(x) (((x) & PAL_BB_154_FC_FRAME_VERSION_MASK) >> PAL_BB_154_FC_FRAME_VERSION_SHIFT) 196 #define PAL_BB_154_FC_SRC_ADDR_MODE_SHIFT 14 197 #define PAL_BB_154_FC_SRC_ADDR_MODE_MASK 0xC000 198 #define PAL_BB_154_FC_SRC_ADDR_MODE(x) (((x) & PAL_BB_154_FC_SRC_ADDR_MODE_MASK) >> PAL_BB_154_FC_SRC_ADDR_MODE_SHIFT) 201 #define PAL_BB_154_FC_LEGACY_SEC_TEST(x) (((x) & (PAL_BB_154_FC_SECURITY_ENABLED_MASK | PAL_BB_154_FC_FRAME_VERSION_MASK)) == PAL_BB_154_FC_SECURITY_ENABLED_MASK) 204 #define PAL_BB_154_FC_FRAME_TYPE_FP_TEST (PAL_BB_154_FC_ACK_REQUEST_MASK | PAL_BB_154_FC_FRAME_TYPE_CMD_MASK) 207 #define PAL_BB_154_FC_FRAME_TYPE_ACK_TEST (PAL_BB_154_FC_ACK_REQUEST_MASK | PAL_BB_154_FC_FRAME_TYPE_CD_MASK) 209 #define PAL_BB_154_SCAN_MAX_PD_ENTRIES 16 210 #define PAL_BB_154_SCAN_MAX_ED_ENTRIES 16 217 #define PAL_BB_154_SYMBOL_DURATION 16 220 #define PAL_BB_154_ED_DURATION 8 223 #define PAL_BB_154_SYMBOLS_PER_OCTET 2 231 #define PAL_BB_154_PREAMBLE_FIELD_LENGTH 8 234 #define PAL_BB_154_SFD_FIELD_LENGTH 2 242 #define PAL_BB_154_aMaxPHYPacketSize 127 245 #define PAL_BB_154_aTurnaroundTime 12 253 #define PAL_BB_154_phySHRDuration 10 256 #define PAL_BB_154_phySymbolsPerOctet 2 259 #define PAL_BB_154_aBaseSlotDuration 60 262 #define PAL_BB_154_aBaseSuperframeDuration (PAL_BB_154_aBaseSlotDuration * PAL_BB_154_aNumSuperframeSlots) 268 #define PAL_BB_154_aGTSDescPersistenceTime 4 271 #define PAL_BB_154_aMaxBeaconOverhead 75 274 #define PAL_BB_154_aMaxBeaconPayloadLength (PAL_BB_154_aMaxPHYPacketSize - PAL_BB_154_aMaxBeaconOverhead) 278 #define PAL_BB_154_aMaxLostBeacons 4 281 #define PAL_BB_154_aMaxMPDUUnsecuredOverhead 25 284 #define PAL_BB_154_aMaxSIFSFrameSize 18 291 #define PAL_BB_154_aMinCAPLength 440 294 #define PAL_BB_154_aMinMPDUOverhead 9 297 #define PAL_BB_154_aNumSuperframeSlots 16 300 #define PAL_BB_154_aUnitBackoffPeriod 20 302 #define PAL_BB_154_RX_ACK_TIMEOUT_SYMB PAL_BB_154_aUnitBackoffPeriod + \ 303 PAL_BB_154_aTurnaroundTime + \ 304 PAL_BB_154_phySHRDuration + \ 305 (6 * PAL_BB_154_phySymbolsPerOctet) 325 typedef uint8_t (*
PalBb154RxIsr_t)(uint8_t *pBuf, uint16_t len, int8_t rssi, uint32_t timestamp, uint8_t flags);
334 typedef void *(*PalBb154Alloc_t)(uint16_t len);
359 #define PAL_BB_154_TX_FRAME_PTR(x) ((uint8_t *)(((PalBb154TxBufDesc_t *)(x))+1)) 385 uint16_t vsCRCOverride;
392 uint8_t maxCSMABackoffs;
393 uint8_t maxFrameRetries;
394 uint8_t promiscuousMode;
396 uint8_t rxOnWhenIdle;
574 void PalBb154Rx(uint32_t due, bool_t now, uint32_t timeout);
void PalBb154Init(void)
Initialize the 802.15.4 baseband driver.
void PalBb154Ed(uint32_t due, uint8_t now)
Perform energy detect.
void(* PalBb154Err_t)(uint8_t status)
Driver error callback signature.
void PalBb154BuildRxBufQueue(uint8_t num)
Build receive buffer queue.
struct PalBb154TxBufDesc PalBb154TxBufDesc_t
Transmit buffer descriptor.
void PalBb154Register(PalBb154Alloc_t allocCback, PalBb154Free_t freeCback)
Register callbacks for the 802.15.4 baseband driver.
void(* PalBb154EdIsr_t)(int8_t rssi)
CCA or energy detect complete ISR callback signature.
uint8_t * PalBb154GetPayloadPtr(uint8_t *pFrame, uint16_t fctl)
Get payload pointer.
void PalBb154ResetChannelParam(void)
Reset channelization parameters.
uint8_t PalBb154ReclaimRxFrame(uint8_t *pRxFrame)
Reclaim the buffer associated with the received frame.
void PalBb154FlushPIB(void)
Flushes PIB attributes to hardware.
PalBb154AddrMode_t
Addressing mode.
struct PalBb154DrvPib_tag PalBb154DrvPib_t
MAC PIB for driver.
802.15.4 channelization parameters.
void PalBb154Enable(void)
Enable the BB hardware.
void(* PalBb154Free_t)(void *pBuf)
Buffer free callback signature.
Baseband driver statistics.
uint8_t PalBb154Off(void)
Cancel any pending operation.
uint8_t PalBb154RssiToLqi(int8_t rssi)
Convert RSSI to LQI.
PalBb154CmdType_t
Values of MAC command type.
void PalBb154ContinuousTx(uint8_t rfChan, uint8_t modulation, uint8_t txPhy, int8_t power)
Enter Continuous Transmit mode.
Transmit buffer descriptor.
uint8_t(* PalBb154RxIsr_t)(uint8_t *pBuf, uint16_t len, int8_t rssi, uint32_t timestamp, uint8_t flags)
Receive complete ISR callback signature.
void PalBb154ContinuousRx(uint8_t rfChan, uint8_t rxPhy)
Enter Continuous Receive mode.
void PalBb154ContinuousStop(void)
Stop Continous Transmit or Receive mode.
void PalBb154DrvGetStats(PalBb154DrvStats_t *pStats)
Get baseband driver statistics.
void PalBb154ClearRxBufs(void)
Clear all received buffers (active and queued).
Platform-independent data types.
void *(* PalBb154Alloc_t)(uint16_t len)
Buffer free callback signature.
uint8_t(* PalBb154FPIsr_t)(uint8_t srcAddrMode, uint64_t srcAddr)
Frame pending check callback.
PalBb154DrvPib_t * PalBb154GetDrvPIB(void)
Get Driver PIB.
void(* PalBb154TxIsr_t)(uint8_t flags)
Transmit complete ISR callback signature.
void PalBb154Disable(void)
Disable the BB hardware.
void PalBb154Rx(uint32_t due, uint8_t now, uint32_t timeout)
Receive a packet.
PalBb154FrameType_t
Values of frame type in FC.
void PalBb154Tx(PalBb154TxBufDesc_t *pDesc, uint8_t cnt, uint32_t due, uint8_t now)
Transmit a packet.
void PalBb154GetLastRssi(uint8_t *pBuf)
Return the last received RSSI.
void PalBb154SetOpParams(const PalBb154OpParam_t *pOpParam)
Set the operation parameters.
void PalBb154SetChannelParam(const PalBb154Chan_t *pParam)
Set channelization parameters.
PalBb154DevType_t
MAC device type (vendor specific).