Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sf32lb-common-pinctrl.h File Reference

Go to the source code of this file.

Macros

#define SF32LB_FSEL_POS   0U
#define SF32LB_FSEL_MSK   0x0000000FU
#define SF32LB_PORT_POS   12U
#define SF32LB_PORT_MSK   0x00003000U
#define SF32LB_PAD_POS   14U
#define SF32LB_PAD_MSK   0x003FC000U
#define SF32LB_PINR_FIELD_POS   22U
#define SF32LB_PINR_FIELD_MSK   0x00C00000U
#define SF32LB_PINR_OFFSET_POS   24U
#define SF32LB_PINR_OFFSET_MSK   0xFF000000U
#define SF32LB_PINMUX(port, pad, fsel, pinr_offset, pinr_field)
 Pin configuration bit field.

Macro Definition Documentation

◆ SF32LB_FSEL_MSK

#define SF32LB_FSEL_MSK   0x0000000FU

◆ SF32LB_FSEL_POS

#define SF32LB_FSEL_POS   0U

◆ SF32LB_PAD_MSK

#define SF32LB_PAD_MSK   0x003FC000U

◆ SF32LB_PAD_POS

#define SF32LB_PAD_POS   14U

◆ SF32LB_PINMUX

#define SF32LB_PINMUX ( port,
pad,
fsel,
pinr_offset,
pinr_field )
Value:
((((pinr_offset) << SF32LB_PINR_OFFSET_POS) & SF32LB_PINR_OFFSET_MSK) | \
(((pinr_field) << SF32LB_PINR_FIELD_POS) & SF32LB_PINR_FIELD_MSK) | \
(((SF32LB_PORT_##port) << SF32LB_PORT_POS) & SF32LB_PORT_MSK) | \
(((pad) << SF32LB_PAD_POS) & SF32LB_PAD_MSK) | \
#define SF32LB_FSEL_MSK
Definition sf32lb-common-pinctrl.h:10
#define SF32LB_PINR_OFFSET_POS
Definition sf32lb-common-pinctrl.h:17
#define SF32LB_PINR_FIELD_POS
Definition sf32lb-common-pinctrl.h:15
#define SF32LB_FSEL_POS
Definition sf32lb-common-pinctrl.h:9
#define SF32LB_PINR_FIELD_MSK
Definition sf32lb-common-pinctrl.h:16
#define SF32LB_PAD_MSK
Definition sf32lb-common-pinctrl.h:14
#define SF32LB_PORT_POS
Definition sf32lb-common-pinctrl.h:11
#define SF32LB_PORT_MSK
Definition sf32lb-common-pinctrl.h:12
#define SF32LB_PINR_OFFSET_MSK
Definition sf32lb-common-pinctrl.h:18
#define SF32LB_PAD_POS
Definition sf32lb-common-pinctrl.h:13

Pin configuration bit field.

Bitmap:

  • 0-10: Configuration bits (function select, pull, drive strength, etc.)
  • 11: Reserved
  • 12-13: Port (SA, PA, ...)
  • 14-21: Pad (0-128)
  • 22-23: PINR register field (0-3)
  • 24:31: PINR register offset (1-255, 0=not used)
Parameters
portPort
padPad
fselFunction select
pinr_offsetPINR register offset
pinr_fieldPINR register field

◆ SF32LB_PINR_FIELD_MSK

#define SF32LB_PINR_FIELD_MSK   0x00C00000U

◆ SF32LB_PINR_FIELD_POS

#define SF32LB_PINR_FIELD_POS   22U

◆ SF32LB_PINR_OFFSET_MSK

#define SF32LB_PINR_OFFSET_MSK   0xFF000000U

◆ SF32LB_PINR_OFFSET_POS

#define SF32LB_PINR_OFFSET_POS   24U

◆ SF32LB_PORT_MSK

#define SF32LB_PORT_MSK   0x00003000U

◆ SF32LB_PORT_POS

#define SF32LB_PORT_POS   12U