Zephyr Project API 4.1.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
silabs-pinctrl-siwx91x.h File Reference

Go to the source code of this file.

Macros

#define LSB_GET(value)   ((value) & -(value))
 
#define FIELD_GET(mask, value)   (((value) & (mask)) / LSB_GET(mask))
 
#define FIELD_PREP(mask, value)   (((value) * LSB_GET(mask)) & (mask))
 
#define SIWX91X_PINCTRL_PORT_MASK   0x0000000FUL
 
#define SIWX91X_PINCTRL_PIN_MASK   0x000000F0UL
 
#define SIWX91X_PINCTRL_ULPPIN_MASK   0x00000F00UL
 
#define SIWX91X_PINCTRL_MODE_MASK   0x0003F000UL
 
#define SIWX91X_PINCTRL_ULPMODE_MASK   0x00FC0000UL
 
#define SIWX91X_PINCTRL_PAD_MASK   0xFF000000UL
 
#define SIWX91X_GPIO(mode, ulpmode, pad, port, pin, ulppin)
 

Macro Definition Documentation

◆ FIELD_GET

#define FIELD_GET (   mask,
  value 
)    (((value) & (mask)) / LSB_GET(mask))

◆ FIELD_PREP

#define FIELD_PREP (   mask,
  value 
)    (((value) * LSB_GET(mask)) & (mask))

◆ LSB_GET

#define LSB_GET (   value)    ((value) & -(value))

◆ SIWX91X_GPIO

#define SIWX91X_GPIO (   mode,
  ulpmode,
  pad,
  port,
  pin,
  ulppin 
)
Value:
FIELD_PREP(SIWX91X_PINCTRL_ULPPIN_MASK, ulppin) | \
FIELD_PREP(SIWX91X_PINCTRL_MODE_MASK, mode) | \
FIELD_PREP(SIWX91X_PINCTRL_ULPMODE_MASK, ulpmode) | \
FIELD_PREP(SIWX91X_PINCTRL_PAD_MASK, pad))
#define SIWX91X_PINCTRL_MODE_MASK
Definition silabs-pinctrl-siwx91x.h:21
#define SIWX91X_PINCTRL_PORT_MASK
Definition silabs-pinctrl-siwx91x.h:18
#define SIWX91X_PINCTRL_ULPPIN_MASK
Definition silabs-pinctrl-siwx91x.h:20
#define SIWX91X_PINCTRL_ULPMODE_MASK
Definition silabs-pinctrl-siwx91x.h:22
#define SIWX91X_PINCTRL_PIN_MASK
Definition silabs-pinctrl-siwx91x.h:19
#define SIWX91X_PINCTRL_PAD_MASK
Definition silabs-pinctrl-siwx91x.h:23
#define FIELD_PREP(mask, value)
Definition silabs-pinctrl-siwx91x.h:15

◆ SIWX91X_PINCTRL_MODE_MASK

#define SIWX91X_PINCTRL_MODE_MASK   0x0003F000UL

◆ SIWX91X_PINCTRL_PAD_MASK

#define SIWX91X_PINCTRL_PAD_MASK   0xFF000000UL

◆ SIWX91X_PINCTRL_PIN_MASK

#define SIWX91X_PINCTRL_PIN_MASK   0x000000F0UL

◆ SIWX91X_PINCTRL_PORT_MASK

#define SIWX91X_PINCTRL_PORT_MASK   0x0000000FUL

◆ SIWX91X_PINCTRL_ULPMODE_MASK

#define SIWX91X_PINCTRL_ULPMODE_MASK   0x00FC0000UL

◆ SIWX91X_PINCTRL_ULPPIN_MASK

#define SIWX91X_PINCTRL_ULPPIN_MASK   0x00000F00UL