Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
b91-pinctrl.h File Reference

Go to the source code of this file.

Macros

#define B91_FUNC_A   0x000000
 
#define B91_FUNC_B   0x010000
 
#define B91_FUNC_C   0x020000
 
#define B91_PORT_A   0x0000
 
#define B91_PORT_B   0x0100
 
#define B91_PORT_C   0x0200
 
#define B91_PORT_D   0x0300
 
#define B91_PORT_E   0x0400
 
#define B91_PIN_0   0x01
 
#define B91_PIN_1   0x02
 
#define B91_PIN_2   0x04
 
#define B91_PIN_3   0x08
 
#define B91_PIN_4   0x10
 
#define B91_PIN_5   0x20
 
#define B91_PIN_6   0x40
 
#define B91_PIN_7   0x80
 
#define B91_PINMUX_SET(func, port, pin)   (func | port | pin)
 
#define B91_PINMUX_GET_FUNC(pinmux)   ((pinmux >> 16) & 0xFF)
 
#define B91_PINMUX_GET_PIN(pinmux)   (pinmux & 0xFFFF)
 
#define B91_PINMUX_DT_INST_GET_ELEM(idx, x, inst)    DT_PROP(DT_INST_PINCTRL_BY_IDX(inst, x, idx), pinmux),
 
#define B91_PINMUX_DT_INST_GET_ARRAY(inst, x)
 

Macro Definition Documentation

◆ B91_FUNC_A

#define B91_FUNC_A   0x000000

◆ B91_FUNC_B

#define B91_FUNC_B   0x010000

◆ B91_FUNC_C

#define B91_FUNC_C   0x020000

◆ B91_PIN_0

#define B91_PIN_0   0x01

◆ B91_PIN_1

#define B91_PIN_1   0x02

◆ B91_PIN_2

#define B91_PIN_2   0x04

◆ B91_PIN_3

#define B91_PIN_3   0x08

◆ B91_PIN_4

#define B91_PIN_4   0x10

◆ B91_PIN_5

#define B91_PIN_5   0x20

◆ B91_PIN_6

#define B91_PIN_6   0x40

◆ B91_PIN_7

#define B91_PIN_7   0x80

◆ B91_PINMUX_DT_INST_GET_ARRAY

#define B91_PINMUX_DT_INST_GET_ARRAY (   inst,
 
)
Value:
x, \
inst)), \
()) \
}
#define B91_PINMUX_DT_INST_GET_ELEM(idx, x, inst)
Definition: b91-pinctrl.h:41
#define DT_INST_NUM_PINCTRLS_BY_IDX(inst, pc_idx)
Get the number of phandles in a pinctrl property for a DT_DRV_COMPAT instance.
Definition: pinctrl.h:398
#define DT_INST_PINCTRL_HAS_IDX(inst, pc_idx)
Test if a DT_DRV_COMPAT instance has a pinctrl property with an index.
Definition: pinctrl.h:435
#define UTIL_LISTIFY(LEN, F,...)
Generates a sequence of code.
Definition: util_macro.h:369
#define COND_CODE_1(_flag, _if_1_code, _else_code)
Insert code depending on whether _flag expands to 1 or not.
Definition: util_macro.h:156

◆ B91_PINMUX_DT_INST_GET_ELEM

#define B91_PINMUX_DT_INST_GET_ELEM (   idx,
  x,
  inst 
)     DT_PROP(DT_INST_PINCTRL_BY_IDX(inst, x, idx), pinmux),

◆ B91_PINMUX_GET_FUNC

#define B91_PINMUX_GET_FUNC (   pinmux)    ((pinmux >> 16) & 0xFF)

◆ B91_PINMUX_GET_PIN

#define B91_PINMUX_GET_PIN (   pinmux)    (pinmux & 0xFFFF)

◆ B91_PINMUX_SET

#define B91_PINMUX_SET (   func,
  port,
  pin 
)    (func | port | pin)

◆ B91_PORT_A

#define B91_PORT_A   0x0000

◆ B91_PORT_B

#define B91_PORT_B   0x0100

◆ B91_PORT_C

#define B91_PORT_C   0x0200

◆ B91_PORT_D

#define B91_PORT_D   0x0300

◆ B91_PORT_E

#define B91_PORT_E   0x0400