Production Line Tool v5.0
The DA1470x Production Line Tool Software Package
Loading...
Searching...
No Matches
Macros
IC specific macros

IC specific macros. 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...
 

Detailed Description

IC specific macros.

Macro Definition Documentation

◆ __IC_SPEC_SAFE_SNPRINTF

#define __IC_SPEC_SAFE_SNPRINTF (   out_str,
  ... 
)
Value:
{ \
out_str[0] = '\0'; \
_snprintf_s(out_str, sizeof(out_str), _TRUNCATE, __VA_ARGS__); \
}

A macro that defines a safe operation of sprintf.

Parameters
out_strThe output string.
...Variable arguments providing additional information.

Definition at line 59 of file ic_specifics.h.

◆ CFG_FW_70x_FLASH_PROG

#define CFG_FW_70x_FLASH_PROG   "uartboot_da1470x.bin"

Definition at line 130 of file ic_specifics.h.

◆ CFG_FW_PROD_TEST_70x

#define CFG_FW_PROD_TEST_70x   "st_fw_da1470x.bin"

Definition at line 125 of file ic_specifics.h.

◆ DUT_IC_DA14580_STR

#define DUT_IC_DA14580_STR   "DA14580"

DA14580 string macro.

Definition at line 111 of file ic_specifics.h.

◆ DUT_IC_DA14701_STR

#define DUT_IC_DA14701_STR   "DA14701"

DA14701 string macro.

Definition at line 113 of file ic_specifics.h.

◆ DUT_IC_DA14705_STR

#define DUT_IC_DA14705_STR   "DA14705"

DA14705 string macro.

Definition at line 115 of file ic_specifics.h.

◆ DUT_IC_DA14706_STR

#define DUT_IC_DA14706_STR   "DA14706"

DA14705 string macro.

Definition at line 117 of file ic_specifics.h.

◆ DUT_IC_DA14708_STR

#define DUT_IC_DA14708_STR   "DA14708"

DA14705 string macro.

Definition at line 119 of file ic_specifics.h.

◆ DUT_IC_SLEEP_THRES_DA1470x

#define DUT_IC_SLEEP_THRES_DA1470x   8000

A macro that defines the DA1470x sleep threshold from cold boot.

Definition at line 133 of file ic_specifics.h.

◆ GPIO_OFFSET_70x_PORT1

#define GPIO_OFFSET_70x_PORT1   0x20

A macro that defines the DA1470x GPIO offset for Port 1.

Definition at line 186 of file ic_specifics.h.

◆ GPIO_OFFSET_70x_PORT2

#define GPIO_OFFSET_70x_PORT2   0x40

A macro that defines the DA1470x GPIO offset for Port 2.

Definition at line 189 of file ic_specifics.h.

◆ IC_58x_GPIO_ENUM_TO_PIN

#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.

Parameters
enum_valThe GPIO port and pin combination.

Definition at line 162 of file ic_specifics.h.

◆ IC_58x_GPIO_ENUM_TO_PORT

#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.

Parameters
enum_valThe GPIO port and pin combination.

Definition at line 154 of file ic_specifics.h.

◆ IC_58x_GPIO_PORT_PIN_TO_ENUM

#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.

Parameters
portThe GPIO port.
pinThe GPIO pin.

Definition at line 146 of file ic_specifics.h.

◆ IC_58x_GPIO_VALID

#define IC_58x_GPIO_VALID (   val)
Value:
(((val >= IC_58x_P0_0) && (val <= IC_58x_P0_7)) || \
((val >= IC_58x_P1_0) && (val <= IC_58x_P1_7)) || \
((val >= IC_58x_P2_0) && (val <= IC_58x_P2_9)) || \
((val >= IC_58x_P3_0) && (val <= IC_58x_P3_7)) )

A macro that checks if a GPIO is valid for DA1458x device ICs.

Parameters
valThe GPIO to check.

Definition at line 169 of file ic_specifics.h.

◆ IC_58x_GPIO_W_OPTS_VALID

#define IC_58x_GPIO_W_OPTS_VALID (   val)
Value:
(IC_58x_GPIO_VALID(val) || \
(val == IC_58x_PULSE_IN_RX))
#define IC_58x_GPIO_VALID(val)
A macro that checks if a GPIO is valid for DA1458x device ICs.
Definition: ic_specifics.h:169

A macro that checks if a GPIO is valid for DA1458x device ICs.

Parameters
valThe GPIO to check.

Definition at line 180 of file ic_specifics.h.

◆ IC_70x_GPIO_ENUM_TO_PIN

#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.

Parameters
enum_valThe DA1470x GPIO port and pin combination.

Definition at line 216 of file ic_specifics.h.

◆ IC_70x_GPIO_ENUM_TO_PORT

#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.

Parameters
enum_valThe DA1469x GPIO port and pin combination.

Definition at line 207 of file ic_specifics.h.

◆ IC_70x_GPIO_IS_LED

#define IC_70x_GPIO_IS_LED (   enum_val)
Value:
((enum_val == IC_70x_LED1) || \
(enum_val == IC_70x_LED2) || \
(enum_val == IC_70x_LED3))

A macro that checks if a DA1470x GPIO of type _gpio_70x is an LED GPIO.

Parameters
enum_valThe DA1468x GPIO value of type _gpio_70x.

Definition at line 225 of file ic_specifics.h.

◆ IC_70x_GPIO_PORT_PIN_TO_ENUM

#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.

Parameters
portThe GPIO port.
pinThe GPIO pin.

Definition at line 198 of file ic_specifics.h.

◆ IC_70x_GPIO_VALID

#define IC_70x_GPIO_VALID (   val)
Value:
(((val >= IC_70x_P0_0) && (val <= IC_70x_P0_31)) || \
((val >= IC_70x_P1_0) && (val <= IC_70x_P1_31)) || \
((val >= IC_70x_P2_0) && (val <= IC_70x_P2_15)))

A macro that checks if a GPIO is valid for DA1470x ICs.

Parameters
valThe GPIO to check.

Definition at line 235 of file ic_specifics.h.

◆ IC_70x_GPIO_W_OPTS_VALID

#define IC_70x_GPIO_W_OPTS_VALID (   val)
Value:
(IC_70x_GPIO_VALID(val) || \
(val == IC_70x_LED1) || \
(val == IC_70x_LED2) || \
(val == IC_70x_LED3) || \
(val == IC_70x_PULSE_IN_RX))
#define IC_70x_GPIO_VALID(val)
A macro that checks if a GPIO is valid for DA1470x ICs.
Definition: ic_specifics.h:235

A macro that checks if a GPIO is valid for DA1470x ICs.

Parameters
valThe GPIO to check.

Definition at line 245 of file ic_specifics.h.

◆ IC_GPIO_ENUM_TO_PIN

#define IC_GPIO_ENUM_TO_PIN (   dut_ic,
  val 
)
Value:
( (uint8_t) (IS_70x(dut_ic) ? IC_70x_GPIO_ENUM_TO_PIN(val) : \
0xFF))
#define IS_70x(dut_ic)
A macro that checks if a device is DA1470x type.
Definition: ic_specifics.h:77
#define IC_70x_GPIO_ENUM_TO_PIN(enum_val)
A macro that returns the pin from a DA1470x GPIO port/pin combination, as shown in _gpio_70x.
Definition: ic_specifics.h:216

A macro that returns the pin from a GPIO port/pin combination, for a given DUT IC.

Parameters
dut_icThe DUT IC.
valThe GPIO port/pin combination.

Definition at line 270 of file ic_specifics.h.

◆ IC_GPIO_ENUM_TO_PORT

#define IC_GPIO_ENUM_TO_PORT (   dut_ic,
  val 
)
Value:
((uint8_t) (IS_70x(dut_ic) ? IC_70x_GPIO_ENUM_TO_PORT(val) : \
0xFF))
#define IC_70x_GPIO_ENUM_TO_PORT(enum_val)
A macro that returns the port from a DA1469x GPIO port/pin combination, as shown in _gpio_70x.
Definition: ic_specifics.h:207

A macro that returns the port from a GPIO port/pin combination, for a given DUT IC.

Parameters
dut_icThe DUT IC.
valThe GPIO port/pin combination.

Definition at line 259 of file ic_specifics.h.

◆ IS_580

#define IS_580 (   dut_ic)    (dut_ic == DUT_IC_DA14580)

A macro that checks if a device is DA14580 type (GU).

Parameters
dut_icThe device IC input parameter.

Definition at line 70 of file ic_specifics.h.

◆ IS_701

#define IS_701 (   dut_ic)    (dut_ic == DUT_IC_DA14701)

A macro that checks if a device is DA14701 type.

Parameters
dut_icThe device IC input parameter.

Definition at line 87 of file ic_specifics.h.

◆ IS_705

#define IS_705 (   dut_ic)    (dut_ic == DUT_IC_DA14705)

A macro that checks if a device is DA14705 type.

Parameters
dut_icThe device IC input parameter.

Definition at line 94 of file ic_specifics.h.

◆ IS_706

#define IS_706 (   dut_ic)    (dut_ic == DUT_IC_DA14706)

A macro that checks if a device is DA14706 type.

Parameters
dut_icThe device IC input parameter.

Definition at line 101 of file ic_specifics.h.

◆ IS_708

#define IS_708 (   dut_ic)    (dut_ic == DUT_IC_DA14708)

A macro that checks if a device is DA14708 type.

Parameters
dut_icThe device IC input parameter.

Definition at line 108 of file ic_specifics.h.

◆ IS_70x

#define IS_70x (   dut_ic)
Value:
((dut_ic == DUT_IC_DA14701) |\
(dut_ic == DUT_IC_DA14705) |\
(dut_ic == DUT_IC_DA14706) |\
(dut_ic == DUT_IC_DA14708))
@ DUT_IC_DA14701
Definition: ic_specifics.h:299
@ DUT_IC_DA14706
Definition: ic_specifics.h:301
@ DUT_IC_DA14705
Definition: ic_specifics.h:300
@ DUT_IC_DA14708
Definition: ic_specifics.h:302

A macro that checks if a device is DA1470x type.

Parameters
dut_icThe device IC input parameter.

Definition at line 77 of file ic_specifics.h.

◆ PULSE_IN_RX_STR

#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.

Definition at line 137 of file ic_specifics.h.