Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
ptu_hw_config.h
Go to the documentation of this file.
1 /* Copyright (c) Nordic Semiconductor. All Rights Reserved.
2  *
3  * The information contained herein is property of Nordic Semiconductor ASA.
4  * Terms and conditions of usage are described in detail in NORDIC
5  * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
6  *
7  * Licensees are granted free, non-transferable use of the information. NO
8  * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
9  * the file.
10  *
11  */
12 
20 #ifndef __PTU_HW_CONFIG_H__
21 #define __PTU_HW_CONFIG_H__
22 
23 #include <stdint.h>
24 #include <stdbool.h>
25 
26 /******************************************************************************
27  * PTU classification
28  ******************************************************************************/
29 
30 #define PTU_CLASS BLE_WPTS_PTU_CLASS_2
31 #define PTU_PTX_IN_MAX 100
33 /******************************************************************************
34  * Cross connection
35  ******************************************************************************/
36 
37 #define PTU_ADV_PWR_MIN -55
39 /******************************************************************************
40  * Rogue object detection
41  ******************************************************************************/
42 
43 #define PTU_POWER_EFFICIENCY 1.0
45 /******************************************************************************
46  * Enable / disable cross connection algorithms.
47  * When an algorithm is disabled, registration of device will be allowed
48  * even if the given registration criteria is not fulfilled.
49  ******************************************************************************/
50 
51 #define PTU_CCA_ADV_IMP_SHIFT_ENABLE true
53 /******************************************************************************
54  * Power save state parameters
55 ******************************************************************************/
56 
57 #define POWERAMP_TEST_VAR_STEP_SIZE 10
58 #define PTU_POWERAMP_INPUT_TEST_STEP_SIZE 5
59 #define PTU_POWERAMP_INPUT_BEACON_SHORT 30
60 #define PTU_POWERAMP_INPUT_BEACON_LONG 40
62 /******************************************************************************
63  * Low power state parameters
64  ******************************************************************************/
65 
66 #define PTU_POWERAMP_INPUT_START 50
68 /******************************************************************************
69  * Power transfer state
70  ******************************************************************************/
71 
72 #define PTU_POWERAMP_INPUT_NOMINAL 60
73 #define PTU_POWERAMP_INPUT_MAX 100
74 #define PTU_POWERAMP_INPUT_MIN 0
75 #define PTU_POWERAMP_INPUT_STEP_SIZE 2
76 #define PTU_POWERAMP_INPUT_STEP_SIZE_REDUCED 1
78 #define PTU_POWERAMP_INPUT_STEP_SIZE_INCREASED 10
79 #define PTU_VRECT_HIGH_OFFSET 100
81 /******************************************************************************
82  * Fault condition parameters
83  ******************************************************************************/
84 
85 #define PTU_ITX_MAX (1000)
86 #define PTU_ITX_MIN (10)
87 #define PTU_TEMPERATURE_MAX (60)
88 #define PTU_TEMPERATURE_MIN (-10)
89 #define PTU_PTX_IN_TEMP_WARNING_DEC 50
90 #define PTU_TEMPERATURE_WARNING_SET 50
91 #define PTU_TEMPERATURE_WARNING_CLEAR 40
93 /******************************************************************************
94  * Sensor data
95  ******************************************************************************/
96 
98 typedef struct
99 {
100  uint8_t nof_extend_beacon_load_var_detected;
101  uint16_t i_ina;
102  uint16_t v_ina;
103  uint16_t p_tx_in;
104  int16_t temperature;
105  uint16_t res_impedance;
106  bool temperature_warning;
107  bool load_var_detected;
108  bool load_detected;
109  bool rogue_obj_detected;
111 
112 /******************************************************************************
113  * Suggested default values for e.g. emulated HAL libraries.
114  ******************************************************************************/
115 
116 #define PTU_ITX_DEFAULT (PTU_ITX_MIN+1)
117 #define PTU_VTX_DEFAULT ((90 * PTU_ITX_DEFAULT))
118 #define PTU_TEMPERATUR_DEFAULT ((PTU_TEMPERATURE_MAX + PTU_TEMPERATURE_MIN) / 2)
119 #define PTU_POWERAMP_INPUT_DEFAULT ((PTU_POWERAMP_INPUT_MAX + PTU_POWERAMP_INPUT_MIN) / 2)
120 #define PTU_PTX_IN_DEFAULT 50
122 #endif /* __PTU_HW_CONFIG_H__ */
123 
Definition of PTU sensor data.
Definition: ptu_hw_config.h:99