1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Note: This header is private to the RADIO HW model 7 */ 8 #ifndef _NRF_RADIO_UTILS_H 9 #define _NRF_RADIO_UTILS_H 10 11 #include <stdint.h> 12 #include "bs_pc_2G4_types.h" 13 14 #ifdef __cplusplus 15 extern "C"{ 16 #endif 17 18 void nhwra_check_packet_conf(void); 19 uint32_t nhwra_RSSI_value_to_modem_format(double rssi_value); 20 uint8_t nhwra_dBm_to_modem_LQIformat(double rssi_value); 21 int nhwra_is_HW_TIFS_enabled(void); 22 void nhwra_prep_rx_request(p2G4_rxv2_t *ongoing_rx, p2G4_address_t *rx_addresses); 23 void nhwra_prep_rx_request_FEC1(p2G4_rxv2_t *rx_req, p2G4_address_t *rx_addresses); 24 void nhwra_prep_tx_request(p2G4_txv2_t *tx_req, uint packet_size, bs_time_t packet_duration, 25 bs_time_t start_time, uint16_t coding_rate); 26 void nhwra_prep_cca_request(p2G4_cca_t *cca_req, bool CCA_not_ED, double rx_pow_offset); 27 28 uint nhwra_tx_copy_payload(uint8_t *tx_buf); 29 uint nhwra_get_payload_length(uint8_t *buf); 30 uint32_t nhwra_get_rx_crc_value(uint8_t *rx_buf, size_t rx_packet_size); 31 uint nhwra_get_crc_length(void); 32 uint nhwra_get_MAXLEN(void); 33 bool nhwra_is_ble_mode(uint32_t MODE); 34 35 #ifdef __cplusplus 36 } 37 #endif 38 39 #endif 40