Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pinctrl_soc_sam_common.h File Reference

Atmel SAM SoC specific helpers for pinctrl driver. More...

#include <zephyr/devicetree.h>
#include <zephyr/types.h>
#include <dt-bindings/pinctrl/atmel_sam_pinctrl.h>

Go to the source code of this file.

Macros

#define SAM_PINCTRL_FLAG_GET(pincfg, pos)
 Obtain Flag value from pinctrl_soc_pin_t configuration.
 
#define SAM_PINCTRL_FLAGS_GET(pincfg)
 
#define SAM_PINCTRL_FLAGS_DEFAULT   (0U)
 Pin flags/attributes .
 
#define SAM_PINCTRL_FLAGS_POS   (0U)
 
#define SAM_PINCTRL_FLAGS_MASK   (0x3F << SAM_PINCTRL_FLAGS_POS)
 
#define SAM_PINCTRL_FLAG_MASK   (1U)
 
#define SAM_PINCTRL_PULLUP_POS   (SAM_PINCTRL_FLAGS_POS)
 
#define SAM_PINCTRL_PULLUP   (1U << SAM_PINCTRL_PULLUP_POS)
 
#define SAM_PINCTRL_PULLDOWN_POS   (SAM_PINCTRL_PULLUP_POS + 1U)
 
#define SAM_PINCTRL_PULLDOWN   (1U << SAM_PINCTRL_PULLDOWN_POS)
 
#define SAM_PINCTRL_OPENDRAIN_POS   (SAM_PINCTRL_PULLDOWN_POS + 1U)
 
#define SAM_PINCTRL_OPENDRAIN   (1U << SAM_PINCTRL_OPENDRAIN_POS)
 
#define SAM_PINCTRL_INPUTENABLE_POS   (SAM_PINCTRL_OPENDRAIN_POS + 1U)
 
#define SAM_PINCTRL_INPUTENABLE   (1U << SAM_PINCTRL_INPUTENABLE_POS)
 
#define SAM_PINCTRL_OUTPUTENABLE_POS   (SAM_PINCTRL_INPUTENABLE_POS + 1U)
 
#define SAM_PINCTRL_OUTPUTENABLE   (1U << SAM_PINCTRL_OUTPUTENABLE_POS)
 
#define SAM_PINCTRL_DRIVESTRENGTH_POS   (SAM_PINCTRL_OUTPUTENABLE_POS + 1U)
 
#define SAM_PINCTRL_DRIVESTRENGTH   (1U << SAM_PINCTRL_DRIVESTRENGTH_POS)
 

Detailed Description

Atmel SAM SoC specific helpers for pinctrl driver.

Macro Definition Documentation

◆ SAM_PINCTRL_DRIVESTRENGTH

#define SAM_PINCTRL_DRIVESTRENGTH   (1U << SAM_PINCTRL_DRIVESTRENGTH_POS)

◆ SAM_PINCTRL_DRIVESTRENGTH_POS

#define SAM_PINCTRL_DRIVESTRENGTH_POS   (SAM_PINCTRL_OUTPUTENABLE_POS + 1U)

◆ SAM_PINCTRL_FLAG_GET

#define SAM_PINCTRL_FLAG_GET ( pincfg,
pos )
Value:
(((pincfg) >> pos) & SAM_PINCTRL_FLAG_MASK)
#define SAM_PINCTRL_FLAG_MASK
Definition pinctrl_soc_sam_common.h:83

Obtain Flag value from pinctrl_soc_pin_t configuration.

Parameters
pincfgpinctrl_soc_pin_t bit field value.
posattribute/flags bit position (SAM_PINFLAGS).

◆ SAM_PINCTRL_FLAG_MASK

#define SAM_PINCTRL_FLAG_MASK   (1U)

◆ SAM_PINCTRL_FLAGS_DEFAULT

#define SAM_PINCTRL_FLAGS_DEFAULT   (0U)

Pin flags/attributes .

◆ SAM_PINCTRL_FLAGS_GET

#define SAM_PINCTRL_FLAGS_GET ( pincfg)
Value:
#define SAM_PINCTRL_FLAGS_MASK
Definition pinctrl_soc_sam_common.h:82
#define SAM_PINCTRL_FLAGS_POS
Definition pinctrl_soc_sam_common.h:81

◆ SAM_PINCTRL_FLAGS_MASK

#define SAM_PINCTRL_FLAGS_MASK   (0x3F << SAM_PINCTRL_FLAGS_POS)

◆ SAM_PINCTRL_FLAGS_POS

#define SAM_PINCTRL_FLAGS_POS   (0U)

◆ SAM_PINCTRL_INPUTENABLE

#define SAM_PINCTRL_INPUTENABLE   (1U << SAM_PINCTRL_INPUTENABLE_POS)

◆ SAM_PINCTRL_INPUTENABLE_POS

#define SAM_PINCTRL_INPUTENABLE_POS   (SAM_PINCTRL_OPENDRAIN_POS + 1U)

◆ SAM_PINCTRL_OPENDRAIN

#define SAM_PINCTRL_OPENDRAIN   (1U << SAM_PINCTRL_OPENDRAIN_POS)

◆ SAM_PINCTRL_OPENDRAIN_POS

#define SAM_PINCTRL_OPENDRAIN_POS   (SAM_PINCTRL_PULLDOWN_POS + 1U)

◆ SAM_PINCTRL_OUTPUTENABLE

#define SAM_PINCTRL_OUTPUTENABLE   (1U << SAM_PINCTRL_OUTPUTENABLE_POS)

◆ SAM_PINCTRL_OUTPUTENABLE_POS

#define SAM_PINCTRL_OUTPUTENABLE_POS   (SAM_PINCTRL_INPUTENABLE_POS + 1U)

◆ SAM_PINCTRL_PULLDOWN

#define SAM_PINCTRL_PULLDOWN   (1U << SAM_PINCTRL_PULLDOWN_POS)

◆ SAM_PINCTRL_PULLDOWN_POS

#define SAM_PINCTRL_PULLDOWN_POS   (SAM_PINCTRL_PULLUP_POS + 1U)

◆ SAM_PINCTRL_PULLUP

#define SAM_PINCTRL_PULLUP   (1U << SAM_PINCTRL_PULLUP_POS)

◆ SAM_PINCTRL_PULLUP_POS

#define SAM_PINCTRL_PULLUP_POS   (SAM_PINCTRL_FLAGS_POS)