1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * This file specifies a set of interfaces meant to allow tests
7  * to modify the HW behavior.
8  * This APIs should only be used for test purposes, to facilitate testing.
9  *
10  * This API is specified in a relatively HW agnostic way, so as to facilitate
11  * other vendors providing an implementation for it, but
12  * it should be used with extra care as the functionality is likely to not be
13  * provided by other build targets than the ones based on this HW models.
14  */
15 
16 #ifndef _NRF_HWMODELS_HW_TESTCHEAT_IF_H
17 #define _NRF_HWMODELS_HW_TESTCHEAT_IF_H
18 
19 #ifdef __cplusplus
20 extern "C"{
21 #endif
22 
23 /**
24  * Offset the Tx power by <power_offset_i> dBs
25  *
26  * For example, set to -20 to lower the Tx power by 20dBs compared
27  * to what it would have been otherwise.
28  */
29 void hw_radio_testcheat_set_tx_power_gain(double power_offset);
30 
31 /**
32  * Offset the measured Rx power (RSSI) by <power_offset_i> dBs
33  *
34  * For example, set to 20 to raise the Rx power by 20dBs compared
35  * to what it would have been otherwise.
36  */
37 void hw_radio_testcheat_set_rx_power_gain(double power_offset);
38 
39 /*
40  * Cheat interface to adjust the time in microseconds it takes
41  * for a 16byte AES ECB block to be computed
42  */
43 void nhw_aes_ecb_cheat_set_t_ecb(unsigned int new_t);
44 /*
45  * Cheat interface to reset the time it takes
46  * for a 16byte AES ECB block to be computed
47  * to the value specified in the infocenter spec.
48  */
49 void nhw_aes_ecb_cheat_reset_t_ecb(void);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif
56