46#ifndef __bool_true_false_are_defined
47 #define __bool_true_false_are_defined 1
63 #define P_DLL_API __declspec(dllexport)
65 #define P_DLL_API __declspec(dllimport)
68#define PDLL_UART_BAUD_RATE 115200
69#define MAX_DEVS_TO_SCAN 16
71#define LOG_PARAM_STR_SIZE 32
72#define TEST_NAME_STR_SIZE 13
73#define HCI_UART_LOOP_70x_DATA_SIZE 252
74#define RF_RSSI_TEST_TX_PACKETS 500
75#define TIMESTAMP_SIZE 480
96 PDLL_UNEXPECTED_EVENT,
97 PDLL_CANNOT_ALLOCATE_MEMORY,
99 PDLL_THREAD_CREATION_ERROR,
102 PDLL_INVALID_DBG_PARAMS,
106 PDLL_COM_PORT_FAILED,
108 PDLL_FW_VERSION_GET_START,
109 PDLL_FW_VERSION_GET_OK,
111 PDLL_RDTESTER_INIT_START,
112 PDLL_RDTESTER_INIT_OK,
114 PDLL_RDTESTER_UART_CONNECT_START,
115 PDLL_RDTESTER_UART_CONNECT_OK,
117 PDLL_RDTESTER_UART_LOOPBACK_START,
118 PDLL_RDTESTER_UART_LOOPBACK_OK,
120 PDLL_RDTESTER_VBAT_UART_CNTRL_START,
121 PDLL_RDTESTER_VBAT_UART_CNTRL_OK,
123 PDLL_RDTESTER_VPP_CNTRL_START,
124 PDLL_RDTESTER_VPP_CNTRL_OK,
126 PDLL_RDTESTER_RST_PULSE_START,
127 PDLL_RDTESTER_RST_PULSE_OK,
129 PDLL_RDTESTER_UART_PULSE_START,
130 PDLL_RDTESTER_UART_PULSE_OK,
132 PDLL_RDTESTER_XTAL_PULSE_START,
133 PDLL_RDTESTER_XTAL_PULSE_OK,
135 PDLL_RDTESTER_PULSE_WIDTH_START,
136 PDLL_RDTESTER_PULSE_WIDTH_OK,
138 PDLL_RDTESTER_VBAT_CNTRL_START,
139 PDLL_RDTESTER_VBAT_CNTRL_OK,
141 PDLL_RDTESTER_VBAT_UART_RST_CNTRL_START,
142 PDLL_RDTESTER_VBAT_UART_RST_CNTRL_OK,
143 PDLL_RDTESTER_INVALID_COMMAND,
145 PDLL_XTAL_TRIM_START,
147 PDLL_XTAL_TRIM_OUT_OF_RANGE,
148 PDLL_XTAL_TRIM_FREQ_CAL_NOT_CONNECTED,
149 PDLL_XTAL_TRIM_WRITE_FAILED,
151 PDLL_XTAL_TRIM_READ_START,
152 PDLL_XTAL_TRIM_READ_OK,
154 PDLL_UART_RESYNC_START,
156 PDLL_UART_RESYNC_FAILED,
158 PDLL_CONT_PKT_TX_START,
159 PDLL_CONT_PKT_TX_STARTED_OK,
161 PDLL_HCI_TEST_STOP_START,
162 PDLL_HCI_TEST_STOPPED_OK,
165 PDLL_PKT_TX_STARTED_OK,
166 PDLL_PKT_TX_ENDED_OK,
168 PDLL_PKT_RX_STATS_START,
169 PDLL_PKT_RX_STATS_STARTED_OK,
171 PDLL_PKT_RX_STATS_STOP_START,
172 PDLL_PKT_RX_STATS_STOPPED_OK,
175 PDLL_PKT_RX_STARTED_OK,
177 PDLL_CUSTOM_ACTION_START,
178 PDLL_CUSTOM_ACTION_OK,
184 PDLL_BLE_ADV_START_OK,
186 PDLL_BLE_ADV_STOP_START,
187 PDLL_BLE_ADV_STOPPED_OK,
189 PDLL_AUDIO_TONE_START,
190 PDLL_AUDIO_TONE_STARTED_OK,
192 PDLL_AUDIO_TONE_STOP,
193 PDLL_AUDIO_TONE_STOPPED_OK,
195 PDLL_AUDIO_TEST_START,
196 PDLL_AUDIO_TEST_ALREADY_ACTIVE,
197 PDLL_AUDIO_TEST_STARTED_OK,
199 PDLL_AUDIO_TEST_STOP,
200 PDLL_AUDIO_TEST_STOPPED_OK,
202 PDLL_AUDIO_TEST_PASSED,
203 PDLL_AUDIO_TEST_FAILED,
204 PDLL_AUDIO_TEST_INVALID_COMMAND,
206 PDLL_GPIO_TOGGLE_START,
207 PDLL_GPIO_TOGGLE_ERROR,
208 PDLL_GPIO_TOGGLE_FINISHED_OK,
212 PDLL_GPIO_SET_FINISHED_OK,
216 PDLL_GPIO_GET_FINISHED_OK,
222 PDLL_SENSOR_TEST_START,
228 PDLL_UART_LOOP_START,
229 PDLL_UART_LOOP_FAILED,
232 PDLL_EXT32Khz_TEST_START,
233 PDLL_EXT32Khz_TEST_FAILED,
234 PDLL_EXT32Khz_TEST_OK,
239 PDLL_SET_TX_PWR_START,
242 PDLL_TIMESTAMP_RD_START,
243 PDLL_TIMESTAMP_RD_OK,
245 PDLL_RESET_MODE_START,
251#define PDLL_HCI_STANDARD_ERROR_CODE_BASE 1000
272 stop_pkt_rx_stats = 5,
275 xtal_trim_val_read = 8,
310 TX_TYPE_PSEUDO_RAND_9 = 0,
311 TX_TYPE_ALT_BITS_1100,
313 TX_TYPE_PSEUDO_RAND_15,
316 TX_TYPE_ALT_BITS_0011,
317 TX_TYPE_ALT_BITS_0101,
318 INVALID_TX_PAYLOAD_TYPE
324 AUDIO_TEST_START = 1,
332 AUDIO_TONE_START = 1,
334 INVALID_AUDIO_TONE_OP
340 SENSOR_IFACE_SPI = 0,
365 GPIO_MODE_INPUT_PULLUP = 1,
366 GPIO_MODE_INPUT_PULLDOWN = 2,
367 GPIO_MODE_OUTPUT = 3,
368 GPIO_MODE_OUTPUT_PUSH_PULL = 4,
369 GPIO_MODE_OUTPUT_OPEN_DRAIN = 5,
385 UART_BAUDRATE_9K6 = 0,
405 RF_TX_PWR_LVL_MIN_VAL = 0U,
406 RF_TX_PWR_LVL_MINUS_50d0 = 0U,
407 RF_TX_PWR_LVL_MINUS_18d0 = 1U,
408 RF_TX_PWR_LVL_MINUS_12d0 = 2U,
409 RF_TX_PWR_LVL_MINUS_8d0 = 3U,
410 RF_TX_PWR_LVL_MINUS_6d0 = 4U,
411 RF_TX_PWR_LVL_MINUS_3d0 = 5U,
412 RF_TX_PWR_LVL_MINUS_2d0 = 6U,
413 RF_TX_PWR_LVL_MINUS_1d0 = 7U,
414 RF_TX_PWR_LVL_0d0 = 8U,
415 RF_TX_PWR_LVL_PLUS_1d5 = 9U,
416 RF_TX_PWR_LVL_PLUS_2d0 = 10U,
417 RF_TX_PWR_LVL_PLUS_3d0 = 11U,
418 RF_TX_PWR_LVL_PLUS_4d0 = 12U,
419 RF_TX_PWR_LVL_PLUS_4d5 = 13U,
420 RF_TX_PWR_LVL_PLUS_5d0 = 14U,
421 RF_TX_PWR_LVL_PLUS_6d0 = 15U,
427 GAP_TX_POWER_MIN = 0U,
428 GAP_TX_POWER_MINUS_50_dBm = 0U,
429 GAP_TX_POWER_MINUS_26_dBm = 1U,
430 GAP_TX_POWER_MINUS_22_dBm = 2U,
431 GAP_TX_POWER_MINUS_18_dBm = 3U,
432 GAP_TX_POWER_MINUS_12_dBm = 4U,
433 GAP_TX_POWER_MINUS_8_dBm = 5U,
434 GAP_TX_POWER_MINUS_6_dBm = 6U,
435 GAP_TX_POWER_MINUS_3_dBm = 7U,
436 GAP_TX_POWER_MINUS_2_dBm = 8U,
437 GAP_TX_POWER_MINUS_1_dBm = 9U,
438 GAP_TX_POWER_0_dBm = 10U,
439 GAP_TX_POWER_1_5_dBm = 11U,
440 GAP_TX_POWER_2_dBm = 12U,
441 GAP_TX_POWER_3_dBm = 13U,
442 GAP_TX_POWER_4_dBm = 14U,
443 GAP_TX_POWER_4_5_dBm = 15U,
444 GAP_TX_POWER_5_dBm = 16U,
445 GAP_TX_POWER_6_dBm = 17U,
446 GAP_TX_POWER_MAX = 17U,
494typedef void (*_user_callback_pdll) (uint32_t com_port_number,
int status,
_rx_stats *rx_stats_t);
601 uint8_t periph_bd_addr[MAX_DEVS_TO_SCAN][BD_ADDR_SIZE];
enum __dut_ic _dut_ic
The Dialog BLE device IC selection.
__audio_tone_op
Commands for audio tone.
__pdll_test_id
The available production tests and operations. Used at __pdll_device::test.
enum __adv_channel _adv_channel
BLE advertisement channels for the HCI BLE scan test.
enum __pdll_tx_pwr_lvl _pdll_tx_pwr_lvl
RF test transmit output power levels.
enum __gpio_pwr_lvl _gpio_pwr_lvl
GPIO power level.
__baud_rate
The UART baud rates supported in the UART loop test.
enum __audio_tone_op _audio_tone_op
Commands for audio tone.
enum __sleep_modes _sleep_modes
The sleep modes supported.
enum __pdll_adv_tx_pwr_lvl _pdll_adv_tx_pwr_lvl
Advertisments GAP transmit output power levels.
enum __baud_rate _baud_rate
The UART baud rates supported in the UART loop test.
enum __payload_type _payload_type
RF TX payload types.
__sleep_modes
The sleep modes supported.
enum __gpio_mode _gpio_mode
GPIO mode.
enum __sensor_iface _sensor_iface
Sensor tests interface selection.
enum __gpio_state _gpio_state
GPIO state.
__payload_type
RF TX payload types.
enum __pdll_test_id _pdll_test_id
The available production tests and operations. Used at __pdll_device::test.
__pdll_adv_tx_pwr_lvl
Advertisments GAP transmit output power levels.
__sensor_iface
Sensor tests interface selection.
__audio_test_op
Commands for audio test.
enum __audio_test_op _audio_test_op
Commands for audio test.
__gpio_pwr_lvl
GPIO power level.
__pdll_tx_pwr_lvl
RF test transmit output power levels.
__adv_channel
BLE advertisement channels for the HCI BLE scan test.
@ rdtester_xtal_pulse_uart
@ rdtester_vbat_uart_ctrl
@ rdtester_vbat_uart_rst_ctrl
P_DLL_API PDLL_RET pdll_set_device_params(const _pdll_device *dev)
Sets the p_dll library specific device parameters.
P_DLL_API PDLL_RET pdll_dbg_close(void)
Closes the debug library.
P_DLL_API PDLL_RET pdll_init(void)
p_dll library initialization function.
P_DLL_API PDLL_RET pdll_perform_test(_pdll_test_id test_id)
Starts the test operations of the p_dll library.
P_DLL_API PDLL_RET pdll_dbg_init(const _dbg_params *dbg_params_t)
p_dll library debug initialization function.
#define TEST_NAME_STR_SIZE
#define LOG_PARAM_STR_SIZE
enum __PDLL_RETURN_CODES PDLL_RET
The P_DLL return status codes.
__PDLL_RETURN_CODES
The P_DLL return status codes.
struct __pdll_gpio_watchdog _pdll_gpio_watchdog
p_dll library parameters for GPIO watchdog operation.
struct __pdll_adc_vbat_en _pdll_adc_vbat_en
p_dll library parameters for enabling the VBAT measurement using the internal ADC.
struct __pdll_audio_test _pdll_audio_test
p_dll library parameters for the audio test.
struct __pdll_device _pdll_device
p_dll library parameters for each different device.
struct __pdll_scan_test _pdll_scan_test
p_dll library parameters for the scan test.
struct __pdll_set_tx_pwr _pdll_set_tx_pwr
p_dll library parameters for setting the TX power level in RF test mode.
union __pdll_test_data _pdll_test_data
p_dll library parameters for the device test data.
struct __pdll_gpio_set _pdll_gpio_set
p_dll library parameters for GPIO set operation.
struct __pdll_rdtester _pdll_rdtester
p_dll library parameters for the rd tester commands. Commands send from the Golden Unit to the CPLD.
struct __pdll_uart_loop_test _pdll_uart_loop_test
p_dll library parameters for UART loop test.
struct __pdll_rdtester_rst _pdll_rdtester_rst
p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command.
struct __pdll_ble_adv_stop_test _pdll_ble_adv_stop_test
p_dll library parameters for stopping BLE advertisements through an HCI command send to the DUT.
struct __pdll_fw_versions _pdll_fw_versions
Holds the prod_test_XXX.bin and p_dll library versions.
struct __pdll_custom_test _pdll_custom_test
p_dll library parameters for the custom test/
struct __pdll_rf_test _pdll_rf_test
p_dll library parameters for the RF test.
struct __rx_stats _rx_stats
Holds the production test results for each device.
struct __gu_scan_data _gu_scan_data
Holds the GU scan data.
struct __pdll_gpio_toggle _pdll_gpio_toggle
p_dll library parameters for GPIO toggle operation.
struct __pdll_audio_tone _pdll_audio_tone
p_dll library parameters for audio tone generation. Mainly used at the Golden Unit.
struct __pdll_gpio_get _pdll_gpio_get
p_dll library parameters for GPIO get status test.
struct __pdll_xtal_test _pdll_xtal_test
p_dll library parameters for the XTAL trim test.
struct __pdll_sleep_test _pdll_sleep_test
p_dll library parameters for setting the devices into the various sleep mode.
struct __pdll_rdtester_vbat_uart_rst _pdll_rdtester_vbat_uart_rst
p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command.
struct __pdll_ext32Khz_test _pdll_ext32Khz_test
p_dll library parameters for testing the external 32Khz low power crystal.
struct __pdll_sensor_test _pdll_sensor_test
p_dll library parameters for the sensor test.
struct __pdll_rdtester_init _pdll_rdtester_init
p_dll library parameters for the rd tester init command.
struct __pdll_ble_adv_start_test _pdll_ble_adv_start_test
p_dll library parameters for starting BLE advertisements through an HCI command send to the DUT.
The main settings of the Debug DLL API.
uint8_t bd_addr_found[BD_ADDR_SIZE]
p_dll library parameters for enabling the VBAT measurement using the internal ADC.
p_dll library parameters for the audio test.
p_dll library parameters for audio tone generation. Mainly used at the Golden Unit.
p_dll library parameters for starting BLE advertisements through an HCI command send to the DUT.
_pdll_tx_pwr_lvl rf_tx_pwr_lvl
uint8_t bd_addr[BD_ADDR_SIZE]
p_dll library parameters for stopping BLE advertisements through an HCI command send to the DUT.
p_dll library parameters for the custom test/
p_dll library parameters for each different device.
_user_callback_pdll clbck
p_dll library parameters for testing the external 32Khz low power crystal.
Holds the prod_test_XXX.bin and p_dll library versions.
char prod_test_app_fw_ver[LOG_PARAM_STR_SIZE]
char pdll_ver[LOG_PARAM_STR_SIZE]
char prod_test_gu_app_fw_ver[LOG_PARAM_STR_SIZE]
char prod_test_ble_fw_ver[LOG_PARAM_STR_SIZE]
char prod_test_gu_ble_fw_ver[LOG_PARAM_STR_SIZE]
p_dll library parameters for GPIO get status test.
p_dll library parameters for GPIO set operation.
p_dll library parameters for GPIO toggle operation.
p_dll library parameters for GPIO watchdog operation.
p_dll library parameters for the rd tester init command.
p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command.
p_dll library parameters for the rdtester_vbat_uart_rst_ctrl command.
p_dll library parameters for the rd tester commands. Commands send from the Golden Unit to the CPLD.
p_dll library parameters for the RF test.
_payload_type payload_type
p_dll library parameters for the scan test.
p_dll library parameters for the sensor test.
char name[TEST_NAME_STR_SIZE]
p_dll library parameters for setting the TX power level in RF test mode.
_pdll_tx_pwr_lvl rf_tx_pwr_lvl
p_dll library parameters for setting the devices into the various sleep mode.
p_dll library parameters for UART loop test.
p_dll library parameters for the XTAL trim test.
Holds the production test results for each device.
_gu_scan_data gu_scan_data[MAX_DEVS_TO_SCAN]
_pdll_fw_versions pdll_fw_versions
uint8_t timestamp[TIMESTAMP_SIZE]
GPIO selection based on IC.
p_dll library parameters for the device test data.
_pdll_xtal_test xtal_trim
_pdll_ble_adv_stop_test ble_adv_stop
_pdll_rdtester_init rdtester_init
_pdll_adc_vbat_en adc_vbat_en
_pdll_rdtester_rst rdtester_rst
_pdll_ble_adv_start_test ble_adv_start
_pdll_set_tx_pwr set_tx_pwr
_pdll_rdtester_vbat_uart_rst rdtester_vbat_uart_rst
_pdll_gpio_watchdog gpio_wd
_pdll_ext32Khz_test ext32Khz_test
_pdll_gpio_toggle gpio_toggle
_pdll_uart_loop_test uart_loop
_pdll_audio_tone audio_tone