1 /* 2 * Copyright (c) 2021 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #include <stdint.h> 7 #include <stddef.h> 8 #include <stdbool.h> 9 10 /* global variables that may be used to imitate real radio behaviour */ 11 static uint32_t g_iq_samples_amount; 12 static uint8_t g_cte_status; 13 static uint8_t g_pdu_switch_pattern; 14 15 /* Stub functions that does nothing. Just to avoid liker complains. */ 16 radio_df_ant_num_get(void)17uint8_t radio_df_ant_num_get(void) 18 { 19 return 0; 20 } 21 radio_df_cte_inline_set_enabled(bool cte_info_in_s1)22void radio_df_cte_inline_set_enabled(bool cte_info_in_s1) 23 { 24 } 25 radio_df_ant_switch_pattern_clear(void)26void radio_df_ant_switch_pattern_clear(void) 27 { 28 } 29 radio_df_ant_switch_pattern_set(uint8_t pattern)30void radio_df_ant_switch_pattern_set(uint8_t pattern) 31 { 32 } 33 radio_df_reset(void)34void radio_df_reset(void) 35 { 36 } 37 radio_switch_complete_and_phy_end_disable(void)38void radio_switch_complete_and_phy_end_disable(void) 39 { 40 } 41 radio_switch_complete_and_phy_end_b2b_tx(uint8_t phy_curr,uint8_t flags_curr,uint8_t phy_next,uint8_t flags_next)42void radio_switch_complete_and_phy_end_b2b_tx(uint8_t phy_curr, uint8_t flags_curr, 43 uint8_t phy_next, uint8_t flags_next) 44 { 45 } 46 radio_switch_complete_phyend_and_rx(uint8_t phy_rx)47void radio_switch_complete_phyend_and_rx(uint8_t phy_rx) 48 { 49 } 50 radio_df_cte_tx_aod_2us_set(uint8_t cte_len)51void radio_df_cte_tx_aod_2us_set(uint8_t cte_len) 52 { 53 } 54 radio_df_cte_tx_aod_4us_set(uint8_t cte_len)55void radio_df_cte_tx_aod_4us_set(uint8_t cte_len) 56 { 57 } 58 radio_df_ant_switching_gpios_cfg(void)59void radio_df_ant_switching_gpios_cfg(void) 60 { 61 } 62 radio_df_cte_tx_aoa_set(uint8_t cte_len)63void radio_df_cte_tx_aoa_set(uint8_t cte_len) 64 { 65 } 66 radio_df_ant_switching_pin_sel_cfg(void)67void radio_df_ant_switching_pin_sel_cfg(void) 68 { 69 } 70 radio_df_mode_set_aoa(void)71void radio_df_mode_set_aoa(void) 72 { 73 } 74 radio_df_mode_set_aod(void)75void radio_df_mode_set_aod(void) 76 { 77 } 78 79 /* CTE RX related functions */ radio_df_cte_rx_2us_switching(void)80void radio_df_cte_rx_2us_switching(void) 81 { 82 } 83 radio_df_cte_rx_4us_switching(void)84void radio_df_cte_rx_4us_switching(void) 85 { 86 } 87 radio_df_iq_data_packet_set(uint8_t * buffer,size_t len)88void radio_df_iq_data_packet_set(uint8_t *buffer, size_t len) 89 { 90 } 91 ut_radio_df_iq_samples_amount_set(uint32_t amount)92void ut_radio_df_iq_samples_amount_set(uint32_t amount) 93 { 94 g_iq_samples_amount = amount; 95 } 96 radio_df_iq_samples_amount_get(void)97uint32_t radio_df_iq_samples_amount_get(void) 98 { 99 return g_iq_samples_amount; 100 } 101 ut_radio_df_cte_status_set(uint8_t status)102void ut_radio_df_cte_status_set(uint8_t status) 103 { 104 g_cte_status = status; 105 } 106 radio_df_cte_status_get(void)107uint8_t radio_df_cte_status_get(void) 108 { 109 return g_cte_status; 110 } 111 ut_radio_df_pdu_antenna_switch_pattern_set(uint8_t pattern)112void ut_radio_df_pdu_antenna_switch_pattern_set(uint8_t pattern) 113 { 114 g_pdu_switch_pattern = pattern; 115 } 116 radio_df_pdu_antenna_switch_pattern_get(void)117uint8_t radio_df_pdu_antenna_switch_pattern_get(void) 118 { 119 return g_pdu_switch_pattern; 120 } 121 radio_df_cte_ready(void)122bool radio_df_cte_ready(void) 123 { 124 return true; 125 } 126