| | |
| | | * @{ |
| | | */ |
| | | |
| | | // 32us |
| | | #define PHY_LIFS_PERIOD_MACCLK (2000) /* MAC 62.4 MHz clock, each step ~16ns */ |
| | | #define PHY_SIFS_PERIOD_MACCLK (2000) /* MAC 62.4 MHz clock, each step ~16ns */ |
| | | |
| | | // 80us |
| | | #define PHY_LIFS_PERIOD_MACCLK_LONG (5000) /* MAC 62.4 MHz clock, each step ~16ns */ |
| | | #define PHY_SIFS_PERIOD_MACCLK_LONG (5000) /* MAC 62.4 MHz clock, each step ~16ns */ |
| | | |
| | | /** UWB TX success */ |
| | | #define UWB_TX_OK (0) |
| | | /** UWB RX success */ |
| | | #define UWB_RX_OK (0) |
| | | |
| | | /** UWB TX error */ |
| | | #define UWB_TX_ERR (1 << 0) |
| | | /** UWB TX missed error */ |
| | | #define UWB_TX_MISSED_ERR (1 << 8) |
| | | |
| | | /** UWB RX success */ |
| | | #define UWB_RX_OK (0) |
| | | |
| | | /** |
| | | * UWB RX error code description: |
| | |
| | | /** UWB RX STS error */ |
| | | #define UWB_STS_ERR (1 << 6) |
| | | |
| | | /** UWB RX missed error */ |
| | | #define UWB_RX_MISSED_ERR (1 << 8) |
| | | /** UWB RX MAC HW and SW conflict in use AES */ |
| | | #define UWB_MAC_AES_CONFLICT_ERR (1 << 9) |
| | | /** UWB RX MAC frame auxiliary security header error */ |
| | |
| | | /** UWB RX PHY error */ |
| | | #define UWB_PHY_ERR (1 << 11) |
| | | /** UWB RX MAC frame filter error */ |
| | | #define UWB_MAC_FILER_ERR (1 << 12) |
| | | #define UWB_MAC_FILTER_ERR (1 << 12) |
| | | /** UWB RX MAC frame format error */ |
| | | #define UWB_MAC_FRAME_ERR (1 << 13) |
| | | /** UWB RX MAC frame decryption error */ |
| | |
| | | |
| | | /** |
| | | * @brief Set IFS |
| | | * @param[in] mode 1: Long IFS, 0: Short IFS |
| | | * @param[in] l_ifs Long IFS, unit: MAC 62.4 MHz clock |
| | | * @param[in] s_ifs Short IFS, unit: MAC 62.4 MHz clock |
| | | */ |
| | | void mac_ifs_set(uint8_t mode); |
| | | void mac_ifs_set(uint16_t l_ifs, uint16_t s_ifs); |
| | | |
| | | /** |
| | | * @brief Enable/Disable RSSI calculation in MAC interrupt handler, the RSSI value will be reported in MAC_HW_REPORT_T |
| | | * @param[in] en 1: Enable, 0: Disable |
| | | */ |
| | | void mac_rssi_calculation_en(uint8_t en); |
| | | |
| | | /** |
| | | * @brief Enable/Disable AGC gain check to fix rx saturation timeout issue |
| | | * @param[in] en 1: Enable, 0: Disable |
| | | */ |
| | | void mac_agc_gain_check_en(uint8_t en); |
| | | |
| | | /** |
| | | * @brief Program the MAC to transmit UWB packet. |
| | |
| | | void mac_pending_tx_evt_clear(void); |
| | | |
| | | /** |
| | | * @brief Clear the pending MAC RX event. |
| | | */ |
| | | void mac_pending_rx_evt_clear(void); |
| | | |
| | | /** |
| | | * @brief Check the MAC busy state. |
| | | * @return MAC busy state |
| | | */ |
| | |
| | | |
| | | /** |
| | | * @brief Get MAC CCM key and Nonce informantion, for debug purpose, this API should be called in MAC RX done process handler. |
| | | * @param[out] ccm_key Pointer of the CCM key buffer |
| | | * @param[out] nonce Pointer of the Nonce buffer |
| | | * @param[out] ccm_key CCM key buffer |
| | | * @param[out] nonce Nonce buffer |
| | | */ |
| | | void mac_ccm_key_nonce_get(uint32_t **ccm_key, uint32_t **nonce); |
| | | void mac_ccm_key_nonce_get(uint32_t ccm_key[4], uint32_t nonce[4]); |
| | | |
| | | #ifdef __cplusplus |
| | | } |