mac_tx.c 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. /**************************************************************************************************
  2. Filename: mac_tx.c
  3. Revised: $Date: 2007-10-15 14:56:36 -0700 (Mon, 15 Oct 2007) $
  4. Revision: $Revision: 15687 $
  5. Description: Describe the purpose and contents of the file.
  6. Copyright 2006-2010 Texas Instruments Incorporated. All rights reserved.
  7. IMPORTANT: Your use of this Software is limited to those specific rights
  8. granted under the terms of a software license agreement between the user
  9. who downloaded the software, his/her employer (which must be your employer)
  10. and Texas Instruments Incorporated (the "License"). You may not use this
  11. Software unless you agree to abide by the terms of the License. The License
  12. limits your use, and you acknowledge, that the Software may not be modified,
  13. copied or distributed unless embedded on a Texas Instruments microcontroller
  14. or used solely and exclusively in conjunction with a Texas Instruments radio
  15. frequency transceiver, which is integrated into your product. Other than for
  16. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  17. works of, modify, distribute, perform, display or sell this Software and/or
  18. its documentation for any purpose.
  19. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  20. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  21. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  22. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  23. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  24. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  25. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  26. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  27. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  28. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  29. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  30. Should you have any questions regarding your right to use this Software,
  31. contact Texas Instruments Incorporated at www.TI.com.
  32. **************************************************************************************************/
  33. /* ------------------------------------------------------------------------------------------------
  34. * Includes
  35. * ------------------------------------------------------------------------------------------------
  36. */
  37. /* hal */
  38. #include "hal_types.h"
  39. #include "hal_defs.h"
  40. #include "hal_mcu.h"
  41. #include "hal_mac_cfg.h"
  42. /* high-level */
  43. #include "mac_spec.h"
  44. #include "mac_pib.h"
  45. /* exported low-level */
  46. #include "mac_low_level.h"
  47. /* low-level specific */
  48. #include "mac_tx.h"
  49. #include "mac_backoff_timer.h"
  50. #include "mac_rx.h"
  51. #include "mac_rx_onoff.h"
  52. #include "mac_radio.h"
  53. #include "mac_sleep.h"
  54. /* target specific */
  55. #include "mac_radio_defs.h"
  56. /* debug */
  57. #include "mac_assert.h"
  58. /* ------------------------------------------------------------------------------------------------
  59. * Defines
  60. * ------------------------------------------------------------------------------------------------
  61. */
  62. #define MFR_LEN MAC_FCS_FIELD_LEN
  63. #define PREPENDED_BYTE_LEN 1
  64. /* ------------------------------------------------------------------------------------------------
  65. * Global Constants
  66. * ------------------------------------------------------------------------------------------------
  67. */
  68. /*
  69. * This is the time, in backoffs, required to set up a slotted transmit.
  70. * It is exported to high level so that code can schedule enough time
  71. * for slotted transmits.
  72. *
  73. * A default is provided if a value is not specified. If the default
  74. * is not appropriate, a #define should be added within hal_mac_cfg.h.
  75. */
  76. #ifndef HAL_MAC_TX_SLOTTED_DELAY
  77. #define HAL_MAC_TX_SLOTTED_DELAY 3
  78. #endif
  79. uint8 const macTxSlottedDelay = HAL_MAC_TX_SLOTTED_DELAY;
  80. /* ------------------------------------------------------------------------------------------------
  81. * Global Variables
  82. * ------------------------------------------------------------------------------------------------
  83. */
  84. uint8 macTxActive;
  85. uint8 macTxType;
  86. uint8 macTxBe;
  87. uint8 macTxCsmaBackoffDelay;
  88. /* ------------------------------------------------------------------------------------------------
  89. * Local Variables
  90. * ------------------------------------------------------------------------------------------------
  91. */
  92. static uint8 nb;
  93. static uint8 txSeqn;
  94. static uint8 txAckReq;
  95. static uint8 txRetransmitFlag;
  96. /* ------------------------------------------------------------------------------------------------
  97. * Local Prototypes
  98. * ------------------------------------------------------------------------------------------------
  99. */
  100. static void txCsmaPrep(void);
  101. static void txGo(void);
  102. static void txCsmaGo(void);
  103. static void txComplete(uint8 status);
  104. /**************************************************************************************************
  105. * @fn macTxInit
  106. *
  107. * @brief Initialize variables for tx module.
  108. *
  109. * @param none
  110. *
  111. * @return none
  112. **************************************************************************************************
  113. */
  114. MAC_INTERNAL_API void macTxInit(void)
  115. {
  116. macTxActive = MAC_TX_ACTIVE_NO_ACTIVITY;
  117. txRetransmitFlag = 0;
  118. }
  119. /**************************************************************************************************
  120. * @fn macTxHaltCleanup
  121. *
  122. * @brief -
  123. *
  124. * @param none
  125. *
  126. * @return none
  127. **************************************************************************************************
  128. */
  129. MAC_INTERNAL_API void macTxHaltCleanup(void)
  130. {
  131. MAC_RADIO_TX_RESET();
  132. macTxInit();
  133. }
  134. /**************************************************************************************************
  135. * @fn macTxFrame
  136. *
  137. * @brief Transmit the frame pointed to by pMacDataTx with the specified type.
  138. * NOTE! It is not legal to call this function from interrupt context.
  139. *
  140. * @param txType - type of transmit
  141. *
  142. * @return none
  143. **************************************************************************************************
  144. */
  145. MAC_INTERNAL_API void macTxFrame(uint8 txType)
  146. {
  147. MAC_ASSERT(!macTxActive); /* transmit on top of transmit */
  148. /* mark transmit as active */
  149. macTxActive = MAC_TX_ACTIVE_INITIALIZE;
  150. /*
  151. * The MAC will not enter sleep mode if there is an active transmit. However, if macSleep() is
  152. * ever called from interrupt context, it possible to enter sleep state after a transmit is
  153. * intiated but before macTxActive is set. To recover from this, the transmit must be aborted
  154. * and proper notificiation given to high-level.
  155. */
  156. if (macSleepState != MAC_SLEEP_STATE_AWAKE)
  157. {
  158. /* notify high-level that transmit had to be aborted */
  159. txComplete(MAC_TX_ABORTED);
  160. /* exit from transmit logic */
  161. return;
  162. }
  163. /* save transmit type */
  164. macTxType = txType;
  165. /*-------------------------------------------------------------------------------
  166. * Prepare for transmit.
  167. */
  168. if (macTxType == MAC_TX_TYPE_SLOTTED)
  169. {
  170. MAC_RADIO_TX_PREP_SLOTTED();
  171. }
  172. else
  173. {
  174. MAC_ASSERT((macTxType == MAC_TX_TYPE_SLOTTED_CSMA) || (macTxType == MAC_TX_TYPE_UNSLOTTED_CSMA));
  175. nb = 0;
  176. macTxBe = (pMacDataTx->internal.txOptions & MAC_TXOPTION_ALT_BE) ? macPib.altBe : macPib.minBe;
  177. if ((macTxType == MAC_TX_TYPE_SLOTTED_CSMA) && (macPib.battLifeExt))
  178. {
  179. macTxBe = MIN(2, macTxBe);
  180. }
  181. txCsmaPrep();
  182. }
  183. /*-------------------------------------------------------------------------------
  184. * Load transmit FIFO unless this is a retransmit. No need to write
  185. * the FIFO again in that case.
  186. */
  187. if (!txRetransmitFlag)
  188. {
  189. uint8 * p;
  190. uint8 lenMhrMsdu;
  191. MAC_ASSERT(pMacDataTx != NULL); /* must have data to transmit */
  192. /* save needed parameters */
  193. txAckReq = MAC_ACK_REQUEST(pMacDataTx->msdu.p);
  194. txSeqn = MAC_SEQ_NUMBER(pMacDataTx->msdu.p);
  195. /* set length of frame (note: use of term msdu is a misnomer, here it's actually mhr + msdu) */
  196. lenMhrMsdu = pMacDataTx->msdu.len;
  197. /* calling code guarantees an unused prepended byte */
  198. p = pMacDataTx->msdu.p - PREPENDED_BYTE_LEN;
  199. /* first byte of buffer is length of MPDU */
  200. *p = lenMhrMsdu + MFR_LEN;
  201. /*
  202. * Flush the TX FIFO. This is necessary in case the previous transmit was never
  203. * actually sent (e.g. CSMA failed without strobing TXON). If bytes are written to
  204. * the FIFO but not transmitted, they remain in the FIFO to be transmitted whenever
  205. * a strobe of TXON does happen.
  206. */
  207. MAC_RADIO_FLUSH_TX_FIFO();
  208. /* write bytes to FIFO, prepended byte is included, MFR is not (it's generated by hardware) */
  209. MAC_RADIO_WRITE_TX_FIFO(p, PREPENDED_BYTE_LEN + lenMhrMsdu);
  210. }
  211. /*-------------------------------------------------------------------------------
  212. * If not receiving, start the transmit. If receive is active
  213. * queue up the transmit.
  214. *
  215. * Critical sections around the state change prevents any sort of race condition
  216. * with macTxStartQueuedFrame(). This guarantees function txGo() will only be
  217. * called once.
  218. */
  219. {
  220. halIntState_t s;
  221. HAL_ENTER_CRITICAL_SECTION(s);
  222. if (!macRxActive && !macRxOutgoingAckFlag)
  223. {
  224. macTxActive = MAC_TX_ACTIVE_GO;
  225. HAL_EXIT_CRITICAL_SECTION(s);
  226. txGo();
  227. }
  228. else
  229. {
  230. macTxActive = MAC_TX_ACTIVE_QUEUED;
  231. HAL_EXIT_CRITICAL_SECTION(s);
  232. }
  233. }
  234. }
  235. /*=================================================================================================
  236. * @fn txCsmaPrep
  237. *
  238. * @brief Prepare/initialize for a CSMA transmit.
  239. *
  240. * @param none
  241. *
  242. * @return none
  243. *=================================================================================================
  244. */
  245. static void txCsmaPrep(void)
  246. {
  247. macTxCsmaBackoffDelay = macRadioRandomByte() & ((1 << macTxBe) - 1);
  248. if (macTxType == MAC_TX_TYPE_SLOTTED_CSMA)
  249. {
  250. MAC_RADIO_TX_PREP_CSMA_SLOTTED();
  251. }
  252. else
  253. {
  254. MAC_RADIO_TX_PREP_CSMA_UNSLOTTED();
  255. }
  256. }
  257. /*=================================================================================================
  258. * @fn txGo
  259. *
  260. * @brief Start a transmit going.
  261. *
  262. * @param none
  263. *
  264. * @return none
  265. *=================================================================================================
  266. */
  267. static void txGo(void)
  268. {
  269. /*
  270. * If execution has reached this point, any transmitted ACK has long since completed. It is
  271. * possible though that there is still a pending callback. If so, it is irrelevant and needs to
  272. * be canceled at this point.
  273. */
  274. MAC_RADIO_CANCEL_ACK_TX_DONE_CALLBACK();
  275. macRxOutgoingAckFlag = 0;
  276. /* based on type of transmit, call the correct "go" functionality */
  277. if (macTxType == MAC_TX_TYPE_SLOTTED)
  278. {
  279. MAC_RADIO_TX_GO_SLOTTED();
  280. }
  281. else
  282. {
  283. txCsmaGo();
  284. }
  285. }
  286. /*=================================================================================================
  287. * @fn txCsmaGo
  288. *
  289. * @brief Start a CSMA transmit going.
  290. *
  291. * @param none
  292. *
  293. * @return none
  294. *=================================================================================================
  295. */
  296. static void txCsmaGo(void)
  297. {
  298. /* The CSMA needs to be performed at normal CCA threshold.
  299. * Turn off the CC2591 compression workaround.
  300. */
  301. COMPRESSION_WORKAROUND_OFF();
  302. if (macTxType == MAC_TX_TYPE_SLOTTED_CSMA)
  303. {
  304. if (macTxCsmaBackoffDelay >= macDataTxTimeAvailable())
  305. {
  306. txComplete(MAC_NO_TIME);
  307. return;
  308. }
  309. MAC_RADIO_TX_GO_SLOTTED_CSMA();
  310. }
  311. else
  312. {
  313. MAC_RADIO_TX_GO_CSMA();
  314. }
  315. }
  316. /**************************************************************************************************
  317. * @fn macTxFrameRetransmit
  318. *
  319. * @brief Retransmit the last frame.
  320. *
  321. * @param none
  322. *
  323. * @return none
  324. **************************************************************************************************
  325. */
  326. MAC_INTERNAL_API void macTxFrameRetransmit(void)
  327. {
  328. txRetransmitFlag = 1;
  329. macTxFrame(macTxType);
  330. }
  331. /**************************************************************************************************
  332. * @fn macTxStartQueuedFrame
  333. *
  334. * @brief See if there is a queued frame waiting to transmit. If so, initiate
  335. * the transmit now.
  336. *
  337. * @param none
  338. *
  339. * @return none
  340. **************************************************************************************************
  341. */
  342. MAC_INTERNAL_API void macTxStartQueuedFrame(void)
  343. {
  344. halIntState_t s;
  345. MAC_ASSERT(!macRxActive && !macRxOutgoingAckFlag); /* queued frames should not transmit in middle of a receive */
  346. /*
  347. * Critical sections around the state change prevents any sort of race condition
  348. * with macTxFrame(). This guarantees function txGo() will only be be called once.
  349. */
  350. HAL_ENTER_CRITICAL_SECTION(s);
  351. if (macTxActive == MAC_TX_ACTIVE_QUEUED)
  352. {
  353. macTxActive = MAC_TX_ACTIVE_GO;
  354. HAL_EXIT_CRITICAL_SECTION(s);
  355. txGo();
  356. }
  357. else
  358. {
  359. HAL_EXIT_CRITICAL_SECTION(s);
  360. }
  361. }
  362. /**************************************************************************************************
  363. * @fn macTxChannelBusyCallback
  364. *
  365. * @brief This callback is executed if a CSMA transmit was attempted but the channel
  366. * was busy.
  367. *
  368. * @param none
  369. *
  370. * @return none
  371. **************************************************************************************************
  372. */
  373. MAC_INTERNAL_API void macTxChannelBusyCallback(void)
  374. {
  375. MAC_ASSERT((macTxType == MAC_TX_TYPE_SLOTTED_CSMA) || (macTxType == MAC_TX_TYPE_UNSLOTTED_CSMA));
  376. /* turn off receiver if allowed */
  377. macTxActive = MAC_TX_ACTIVE_CHANNEL_BUSY;
  378. macRxOffRequest();
  379. /* clear channel assement failed, follow through with CSMA algorithm */
  380. nb++;
  381. if (nb > macPib.maxCsmaBackoffs)
  382. {
  383. txComplete(MAC_CHANNEL_ACCESS_FAILURE);
  384. }
  385. else
  386. {
  387. macTxBe = MIN(macTxBe+1, macPib.maxBe);
  388. txCsmaPrep();
  389. macTxActive = MAC_TX_ACTIVE_GO;
  390. txCsmaGo();
  391. }
  392. }
  393. /**************************************************************************************************
  394. * @fn macTxDoneCallback
  395. *
  396. * @brief This callback is executed when transmit completes.
  397. *
  398. * @param none
  399. *
  400. * @return none
  401. **************************************************************************************************
  402. */
  403. MAC_INTERNAL_API void macTxDoneCallback(void)
  404. {
  405. halIntState_t s;
  406. /*
  407. * There is a small chance this function could be called twice for a single transmit.
  408. * To prevent logic from executing twice, the state variable macTxActive is used as
  409. * a gating mechanism to guarantee single time execution.
  410. */
  411. HAL_ENTER_CRITICAL_SECTION(s);
  412. if (macTxActive == MAC_TX_ACTIVE_GO)
  413. {
  414. /* see if ACK was requested */
  415. if (!txAckReq)
  416. {
  417. macTxActive = MAC_TX_ACTIVE_DONE;
  418. HAL_EXIT_CRITICAL_SECTION(s);
  419. /* ACK was not requested, transmit is complete */
  420. txComplete(MAC_SUCCESS);
  421. }
  422. else
  423. {
  424. /*
  425. * ACK was requested - must wait to receive it. A timer is set
  426. * to expire after the timeout duration for waiting for an ACK.
  427. * If an ACK is received, the function macTxAckReceived() is called.
  428. * If an ACK is not received within the timeout period,
  429. * the function macTxAckNotReceivedCallback() is called.
  430. */
  431. macTxActive = MAC_TX_ACTIVE_LISTEN_FOR_ACK;
  432. MAC_RADIO_TX_REQUEST_ACK_TIMEOUT_CALLBACK();
  433. HAL_EXIT_CRITICAL_SECTION(s);
  434. }
  435. }
  436. else
  437. {
  438. HAL_EXIT_CRITICAL_SECTION(s);
  439. }
  440. }
  441. /**************************************************************************************************
  442. * @fn macTxAckReceivedCallback
  443. *
  444. * @brief This function is called by the receive logic when an ACK is received and
  445. * transmit logic is listening for an ACK.
  446. *
  447. * @param seqn - sequence number of received ACK
  448. * @param pendingFlag - set if pending flag of ACK is set, cleared otherwise
  449. *
  450. * @return none
  451. **************************************************************************************************
  452. */
  453. MAC_INTERNAL_API void macTxAckReceivedCallback(uint8 seqn, uint8 pendingFlag)
  454. {
  455. halIntState_t s;
  456. /* only process if listening for an ACK; critical section prevents race condition problems */
  457. HAL_ENTER_CRITICAL_SECTION(s);
  458. if (macTxActive == MAC_TX_ACTIVE_LISTEN_FOR_ACK)
  459. {
  460. macTxActive = MAC_TX_ACTIVE_POST_ACK;
  461. MAC_RADIO_TX_CANCEL_ACK_TIMEOUT_CALLBACK();
  462. HAL_EXIT_CRITICAL_SECTION(s);
  463. /* see if the sequence number of received ACK matches sequence number of packet just sent */
  464. if (seqn == txSeqn)
  465. {
  466. /*
  467. * Sequence numbers match so transmit is successful. Return appropriate
  468. * status based on the pending flag of the received ACK.
  469. */
  470. if (pendingFlag)
  471. {
  472. txComplete(MAC_ACK_PENDING);
  473. }
  474. else
  475. {
  476. txComplete(MAC_SUCCESS);
  477. }
  478. }
  479. else
  480. {
  481. /* sequence number did not match; per spec, transmit failed at this point */
  482. txComplete(MAC_NO_ACK);
  483. }
  484. }
  485. else
  486. {
  487. HAL_EXIT_CRITICAL_SECTION(s);
  488. }
  489. }
  490. /**************************************************************************************************
  491. * @fn macTxAckNotReceivedCallback
  492. *
  493. * @brief This function is called by the receive logic when transmit is listening
  494. * for an ACK but something else is received. It is also called if the
  495. * listen-for-ACK timeout is reached.
  496. *
  497. * @brief
  498. *
  499. * @param none
  500. *
  501. * @return none
  502. **************************************************************************************************
  503. */
  504. MAC_INTERNAL_API void macTxAckNotReceivedCallback(void)
  505. {
  506. halIntState_t s;
  507. /* only process if listening for an ACK; critical section prevents race condition problems */
  508. HAL_ENTER_CRITICAL_SECTION(s);
  509. if (macTxActive == MAC_TX_ACTIVE_LISTEN_FOR_ACK)
  510. {
  511. macTxActive = MAC_TX_ACTIVE_POST_ACK;
  512. MAC_RADIO_TX_CANCEL_ACK_TIMEOUT_CALLBACK();
  513. HAL_EXIT_CRITICAL_SECTION(s);
  514. /* a non-ACK was received when expecting an ACK, per spec transmit is over at this point */
  515. txComplete(MAC_NO_ACK);
  516. }
  517. else
  518. {
  519. HAL_EXIT_CRITICAL_SECTION(s);
  520. }
  521. }
  522. /*=================================================================================================
  523. * @fn txComplete
  524. *
  525. * @brief Transmit has completed. Perform needed maintenance and return status of
  526. * the transmit via callback function.
  527. *
  528. * @param status - status of the transmit that just went out
  529. *
  530. * @return none
  531. *=================================================================================================
  532. */
  533. static void txComplete(uint8 status)
  534. {
  535. /* reset the retransmit flag */
  536. txRetransmitFlag = 0;
  537. /* update tx state; turn off receiver if nothing is keeping it on */
  538. macTxActive = MAC_TX_ACTIVE_NO_ACTIVITY;
  539. /* turn off receive if allowed */
  540. macRxOffRequest();
  541. /* update transmit power in case there was a change */
  542. macRadioUpdateTxPower();
  543. /*
  544. * Channel cannot change during transmit so update it here. (Channel *can* change during
  545. * a receive. The update function resets receive logic and any partially received
  546. * frame is purged.)
  547. */
  548. macRadioUpdateChannel();
  549. /* return status of transmit via callback function */
  550. macTxCompleteCallback(status);
  551. }
  552. /**************************************************************************************************
  553. * @fn macTxTimestampCallback
  554. *
  555. * @brief This callback function records the timestamp into the receive data structure.
  556. * It should be called as soon as possible after there is a valid timestamp.
  557. *
  558. * @param none
  559. *
  560. * @return none
  561. **************************************************************************************************
  562. */
  563. MAC_INTERNAL_API void macTxTimestampCallback(void)
  564. {
  565. MAC_ASSERT(pMacDataTx != NULL); /* transmit structure must be there */
  566. pMacDataTx->internal.timestamp = macBackoffTimerCapture();
  567. pMacDataTx->internal.timestamp2 = MAC_RADIO_TIMER_CAPTURE();
  568. }
  569. /**************************************************************************************************
  570. * @fn macTxCollisionWithRxCallback
  571. *
  572. * @brief Function called if transmit strobed on top of a receive.
  573. *
  574. * @param none
  575. *
  576. * @return none
  577. **************************************************************************************************
  578. */
  579. MAC_INTERNAL_API void macTxCollisionWithRxCallback(void)
  580. {
  581. macRxHaltCleanup();
  582. }
  583. /**************************************************************************************************
  584. * Compile Time Integrity Checks
  585. **************************************************************************************************
  586. */
  587. #if (MAC_TX_ACTIVE_NO_ACTIVITY != 0x00)
  588. #error "ERROR! Zero is reserved value of macTxActive. Allows boolean operations, e.g !macTxActive."
  589. #endif
  590. /**************************************************************************************************
  591. */