Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platform: ext: nordic_nrf: align pinctrl with main branch #111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 4 additions & 31 deletions platform/ext/target/nordic_nrf/common/core/common/nrf-pinctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,21 @@
#ifndef NRF_INCLUDE_NRF_PINCTRL_H
#define NRF_INCLUDE_NRF_PINCTRL_H

/*
* The whole nRF pin configuration information is encoded in a 32-bit bitfield
* organized as follows:
*
* - 31..16: Pin function.
* - 15: Reserved.
* - 14: Pin inversion mode.
* - 13: Pin low power mode.
* - 12..9: Pin output drive configuration.
* - 8..7: Pin pull configuration.
* - 6..0: Pin number (combination of port and pin).
*/
/* NOTE: Keep in sync with Zephyr's nrf-pinctrl.h */

/**
* @name nRF pin configuration bit field positions and masks.
* @{
*/

/** Position of the function field. */
#define NRF_FUN_POS 16U
#define NRF_FUN_POS 18U
/** Mask for the function field. */
#define NRF_FUN_MSK 0xFFFFU
/** Position of the invert field. */
#define NRF_INVERT_POS 14U
/** Mask for the invert field. */
#define NRF_INVERT_MSK 0x1U
/** Position of the low power field. */
#define NRF_LP_POS 13U
/** Mask for the low power field. */
#define NRF_LP_MSK 0x1U
/** Position of the drive configuration field. */
#define NRF_DRIVE_POS 9U
/** Mask for the drive configuration field. */
#define NRF_DRIVE_MSK 0xFU
/** Position of the pull configuration field. */
#define NRF_PULL_POS 7U
/** Mask for the pull configuration field. */
#define NRF_PULL_MSK 0x3U
#define NRF_FUN_MSK 0x3FFFU
/** Position of the pin field. */
#define NRF_PIN_POS 0U
/** Mask for the pin field. */
#define NRF_PIN_MSK 0x7FU
#define NRF_PIN_MSK 0x1FFU

/** @} */

Expand Down