Production Line Tool v5.0
The DA1470x Production Line Tool Software Package
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
ic_specifics.h File Reference

IC specific items. More...

#include <stdint.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <strsafe.h>

Go to the source code of this file.

Classes

union  __ic_gpio
 GPIO selection based on IC. More...
 

Macros

#define __IC_SPEC_SAFE_SNPRINTF(out_str, ...)
 A macro that defines a safe operation of sprintf. More...
 
#define IS_580(dut_ic)   (dut_ic == DUT_IC_DA14580)
 A macro that checks if a device is DA14580 type (GU). More...
 
#define IS_70x(dut_ic)
 A macro that checks if a device is DA1470x type. More...
 
#define IS_701(dut_ic)   (dut_ic == DUT_IC_DA14701)
 A macro that checks if a device is DA14701 type. More...
 
#define IS_705(dut_ic)   (dut_ic == DUT_IC_DA14705)
 A macro that checks if a device is DA14705 type. More...
 
#define IS_706(dut_ic)   (dut_ic == DUT_IC_DA14706)
 A macro that checks if a device is DA14706 type. More...
 
#define IS_708(dut_ic)   (dut_ic == DUT_IC_DA14708)
 A macro that checks if a device is DA14708 type. More...
 
#define DUT_IC_DA14580_STR   "DA14580"
 DA14580 string macro. More...
 
#define DUT_IC_DA14701_STR   "DA14701"
 DA14701 string macro. More...
 
#define DUT_IC_DA14705_STR   "DA14705"
 DA14705 string macro. More...
 
#define DUT_IC_DA14706_STR   "DA14706"
 DA14705 string macro. More...
 
#define DUT_IC_DA14708_STR   "DA14708"
 DA14705 string macro. More...
 
#define CFG_FW_PROD_TEST_70x   "st_fw_da1470x.bin"
 
#define CFG_FW_70x_FLASH_PROG   "uartboot_da1470x.bin"
 
#define DUT_IC_SLEEP_THRES_DA1470x   8000
 A macro that defines the DA1470x sleep threshold from cold boot. More...
 
#define PULSE_IN_RX_STR   "PULSE_IN_RX"
 A macro that defines the string used in XML for the XTAL trim pulse in UART RX pin. More...
 
#define IC_58x_GPIO_PORT_PIN_TO_ENUM(port, pin)   (port * 10 + pin)
 A macro that returns a single DA1458x GPIO value combination, as shown in _gpio_58x, for a given DA1458x GPIO port and pin. More...
 
#define IC_58x_GPIO_ENUM_TO_PORT(enum_val)   ((int)floor((double)enum_val / 10))
 A macro that returns the port from a DA1458x GPIO port/pin combination, as shown in _gpio_58x. More...
 
#define IC_58x_GPIO_ENUM_TO_PIN(enum_val)   (enum_val % 10)
 A macro that returns the pin from a DA1458x GPIO port/pin combination, as shown in _gpio_58x. More...
 
#define IC_58x_GPIO_VALID(val)
 A macro that checks if a GPIO is valid for DA1458x device ICs. More...
 
#define IC_58x_GPIO_W_OPTS_VALID(val)
 A macro that checks if a GPIO is valid for DA1458x device ICs. More...
 
#define GPIO_OFFSET_70x_PORT1   0x20
 A macro that defines the DA1470x GPIO offset for Port 1. More...
 
#define GPIO_OFFSET_70x_PORT2   0x40
 A macro that defines the DA1470x GPIO offset for Port 2. More...
 
#define IC_70x_GPIO_PORT_PIN_TO_ENUM(port, pin)    (port * GPIO_OFFSET_70x_PORT1 + pin)
 A macro that returns a single DA1470x GPIO value combination, as shown in _gpio_70x, for a given GPIO port and pin. More...
 
#define IC_70x_GPIO_ENUM_TO_PORT(enum_val)    ((int)floor((double)enum_val / GPIO_OFFSET_70x_PORT1))
 A macro that returns the port from a DA1469x GPIO port/pin combination, as shown in _gpio_70x. More...
 
#define IC_70x_GPIO_ENUM_TO_PIN(enum_val)    (enum_val % GPIO_OFFSET_70x_PORT1)
 A macro that returns the pin from a DA1470x GPIO port/pin combination, as shown in _gpio_70x. More...
 
#define IC_70x_GPIO_IS_LED(enum_val)
 A macro that checks if a DA1470x GPIO of type _gpio_70x is an LED GPIO. More...
 
#define IC_70x_GPIO_VALID(val)
 A macro that checks if a GPIO is valid for DA1470x ICs. More...
 
#define IC_70x_GPIO_W_OPTS_VALID(val)
 A macro that checks if a GPIO is valid for DA1470x ICs. More...
 
#define IC_GPIO_ENUM_TO_PORT(dut_ic, val)
 A macro that returns the port from a GPIO port/pin combination, for a given DUT IC. More...
 
#define IC_GPIO_ENUM_TO_PIN(dut_ic, val)
 A macro that returns the pin from a GPIO port/pin combination, for a given DUT IC. More...
 

Typedefs

typedef enum __ic_spec_status _ic_spec_status
 Values that represent IC specific function status.
 
typedef enum __dut_ic _dut_ic
 The Dialog BLE device IC selection.
 
typedef enum __gpio_gen _gpio_gen
 Values that represent a generic GPIO.
 
typedef enum __gpio_58x _gpio_58x
 Values that represent the DA1458x GPIOs.
 
typedef enum __gpio_70x _gpio_70x
 Values that represent the DA1470x GPIOs.
 
typedef enum __vbat_rst_mode _vbat_rst_mode
 The available options for the VBAT/RST mode.
 
typedef union __ic_gpio _ic_gpio
 GPIO selection based on IC. More...
 

Enumerations

enum  __ic_spec_status { IC_SPEC_SUCCESS = 0 , IC_SPEC_ERROR , IC_SPEC_INTERNAL_ERROR }
 Values that represent IC specific function status. More...
 
enum  __dut_ic {
  DUT_IC_DA14580 = 0 , DUT_IC_DA14701 , DUT_IC_DA14705 , DUT_IC_DA14706 ,
  DUT_IC_DA14708 , INVALID_DUT_IC
}
 The Dialog BLE device IC selection. More...
 
enum  __gpio_gen { IC_GEN = 0x00 }
 Values that represent a generic GPIO. More...
 
enum  __gpio_58x {
  IC_58x_P0_0 = 00 , IC_58x_P0_1 , IC_58x_P0_2 , IC_58x_P0_3 ,
  IC_58x_P0_4 , IC_58x_P0_5 , IC_58x_P0_6 , IC_58x_P0_7 ,
  IC_58x_P1_0 = 10 , IC_58x_P1_1 , IC_58x_P1_2 , IC_58x_P1_3 ,
  IC_58x_P1_4 , IC_58x_P1_5 , IC_58x_P1_6 , IC_58x_P1_7 ,
  IC_58x_P2_0 = 20 , IC_58x_P2_1 , IC_58x_P2_2 , IC_58x_P2_3 ,
  IC_58x_P2_4 , IC_58x_P2_5 , IC_58x_P2_6 , IC_58x_P2_7 ,
  IC_58x_P2_8 , IC_58x_P2_9 , IC_58x_P3_0 = 30 , IC_58x_P3_1 ,
  IC_58x_P3_2 , IC_58x_P3_3 , IC_58x_P3_4 , IC_58x_P3_5 ,
  IC_58x_P3_6 , IC_58x_P3_7 , IC_58x_INVALID_XTAL_GPIO = 48 , IC_58x_PULSE_IN_RX = 0xFE
}
 Values that represent the DA1458x GPIOs. More...
 
enum  __gpio_70x {
  IC_70x_P0_0 = 00 , IC_70x_P0_1 , IC_70x_P0_2 , IC_70x_P0_3 ,
  IC_70x_P0_4 , IC_70x_P0_5 , IC_70x_P0_6 , IC_70x_P0_7 ,
  IC_70x_P0_8 , IC_70x_P0_9 , IC_70x_P0_10 , IC_70x_P0_11 ,
  IC_70x_P0_12 , IC_70x_P0_13 , IC_70x_P0_14 , IC_70x_P0_15 ,
  IC_70x_P0_16 , IC_70x_P0_17 , IC_70x_P0_18 , IC_70x_P0_19 ,
  IC_70x_P0_20 , IC_70x_P0_21 , IC_70x_P0_22 , IC_70x_P0_23 ,
  IC_70x_P0_24 , IC_70x_P0_25 , IC_70x_P0_26 , IC_70x_P0_27 ,
  IC_70x_P0_28 , IC_70x_P0_29 , IC_70x_P0_30 , IC_70x_P0_31 ,
  IC_70x_P1_0 , IC_70x_P1_1 , IC_70x_P1_2 , IC_70x_P1_3 ,
  IC_70x_P1_4 , IC_70x_P1_5 , IC_70x_P1_6 , IC_70x_P1_7 ,
  IC_70x_P1_8 , IC_70x_P1_9 , IC_70x_P1_10 , IC_70x_P1_11 ,
  IC_70x_P1_12 , IC_70x_P1_13 , IC_70x_P1_14 , IC_70x_P1_15 ,
  IC_70x_P1_16 , IC_70x_P1_17 , IC_70x_P1_18 , IC_70x_P1_19 ,
  IC_70x_P1_20 , IC_70x_P1_21 , IC_70x_P1_22 , IC_70x_P1_23 ,
  IC_70x_P1_24 , IC_70x_P1_25 , IC_70x_P1_26 , IC_70x_P1_27 ,
  IC_70x_P1_28 , IC_70x_P1_29 , IC_70x_P1_30 , IC_70x_P1_31 ,
  IC_70x_P2_0 , IC_70x_P2_1 , IC_70x_P2_2 , IC_70x_P2_3 ,
  IC_70x_P2_4 , IC_70x_P2_5 , IC_70x_P2_6 , IC_70x_P2_7 ,
  IC_70x_P2_8 , IC_70x_P2_9 , IC_70x_P2_10 , IC_70x_P2_11 ,
  IC_70x_P2_12 , IC_70x_P2_13 , IC_70x_P2_14 , IC_70x_P2_15 ,
  IC_70x_LED1 = 0xF1 , IC_70x_LED2 = 0xF2 , IC_70x_LED3 = 0xF3 , IC_70x_PULSE_IN_RX = 0xFE
}
 Values that represent the DA1470x GPIOs. More...
 
enum  __vbat_rst_mode { VBAT_ONLY = 0 , VBAT_ON_RST , VBAT_AS_RST , INVALID_VBAT_MODE }
 The available options for the VBAT/RST mode. More...
 

Functions

__inline bool is_ic_supported (_dut_ic dut_ic)
 Query if the IC is supported by current PLT version. More...
 
__inline _ic_spec_status get_dut_ic_str (_dut_ic dut_ic, char *str)
 Return the dut_ic string resolution. More...
 
__inline _ic_spec_status get_dut_ic_enum (_dut_ic *dut_ic, char *str)
 Return the dut_ic enumeration value from the string equivalent. More...
 
__inline _ic_spec_status get_dut_ic_prod_test_fw (_dut_ic dut_ic, char *file_name)
 Returns the production firmware file name for the given device IC. More...
 
__inline _ic_spec_status get_dut_ic_mem_prog_fw (_dut_ic dut_ic, char *file_name)
 Returns the memory programming firmware file name for the given device IC. More...
 
__inline _ic_spec_status check_gpio (_dut_ic dut_ic, _ic_gpio gpio_sel)
 Check if a GPIO port/pin configuration is valid. More...
 
__inline _ic_spec_status get_gpio_name_str (_dut_ic dut_ic, _ic_gpio gpio, char *str)
 Return the selected GPIO in a string. More...
 
__inline _ic_spec_status check_gpio_is_led (_dut_ic dut_ic, _ic_gpio gpio)
 Return whether the selected GPIO in an LED. More...
 

Detailed Description

IC specific items.

Copyright (C) 2022 Dialog Semiconductor. This computer program includes Confidential, Proprietary Information of Dialog Semiconductor. All Rights Reserved.

bluet.nosp@m.ooth.nosp@m..supp.nosp@m.ort@.nosp@m.diase.nosp@m.mi.c.nosp@m.om

Definition in file ic_specifics.h.