Zephyr API Documentation
3.5.0
A Scalable Open Source RTOS
|
|
3.5.0 |
Gigadevice SoC specific helpers for pinctrl driver. More...
Go to the source code of this file.
Macros | |
#define | GD32_PUPD_GET(pincfg) (((pincfg) >> GD32_PUPD_POS) & GD32_PUPD_MSK) |
Obtain PUPD field from pinctrl_soc_pin_t configuration. | |
#define | GD32_OTYPE_GET(pincfg) (((pincfg) >> GD32_OTYPE_POS) & GD32_OTYPE_MSK) |
Obtain OTYPE field from pinctrl_soc_pin_t configuration. | |
#define | GD32_OSPEED_GET(pincfg) (((pincfg) >> GD32_OSPEED_POS) & GD32_OSPEED_MSK) |
Obtain OSPEED field from pinctrl_soc_pin_t configuration. | |
GD32 PUPD (values match the ones in the HAL for AF model). | |
#define | GD32_PUPD_NONE 0U |
No pull-up/down. | |
#define | GD32_PUPD_PULLUP 1U |
Pull-up. | |
#define | GD32_PUPD_PULLDOWN 2U |
Pull-down. | |
GD32 OTYPE (values match the ones in the HAL for AF model). | |
#define | GD32_OTYPE_PP 0U |
Push-pull. | |
#define | GD32_OTYPE_OD 1U |
Open-drain. | |
GD32 OSPEED (values match the ones in the HAL for AF model, mode minus | |
one for AFIO model). | |
#define | GD32_OSPEED_10MHZ 0U |
Maximum 10MHz. | |
#define | GD32_OSPEED_2MHZ 1U |
Maximum 2MHz. | |
#define | GD32_OSPEED_50MHZ 2U |
Maximum 50MHz. | |
#define | GD32_OSPEED_MAX 3U |
Maximum speed. | |
GD32 pin configuration bit field mask and positions. | |
#define | GD32_PUPD_MSK 0x3U |
PUPD field mask. | |
#define | GD32_PUPD_POS 29U |
PUPD field position. | |
#define | GD32_OTYPE_MSK 0x1U |
OTYPE field mask. | |
#define | GD32_OTYPE_POS 28U |
OTYPE field position. | |
#define | GD32_OSPEED_MSK 0x3U |
OSPEED field mask. | |
#define | GD32_OSPEED_POS 26U |
OSPEED field position. | |
Gigadevice SoC specific helpers for pinctrl driver.
#define GD32_OSPEED_10MHZ 0U |
Maximum 10MHz.
#define GD32_OSPEED_2MHZ 1U |
Maximum 2MHz.
#define GD32_OSPEED_50MHZ 2U |
Maximum 50MHz.
#define GD32_OSPEED_GET | ( | pincfg | ) | (((pincfg) >> GD32_OSPEED_POS) & GD32_OSPEED_MSK) |
Obtain OSPEED field from pinctrl_soc_pin_t configuration.
pincfg | pinctrl_soc_pin_t bit field value. |
#define GD32_OSPEED_MAX 3U |
Maximum speed.
#define GD32_OSPEED_MSK 0x3U |
OSPEED field mask.
#define GD32_OSPEED_POS 26U |
OSPEED field position.
#define GD32_OTYPE_GET | ( | pincfg | ) | (((pincfg) >> GD32_OTYPE_POS) & GD32_OTYPE_MSK) |
Obtain OTYPE field from pinctrl_soc_pin_t configuration.
pincfg | pinctrl_soc_pin_t bit field value. |
#define GD32_OTYPE_MSK 0x1U |
OTYPE field mask.
#define GD32_OTYPE_OD 1U |
Open-drain.
#define GD32_OTYPE_POS 28U |
OTYPE field position.
#define GD32_OTYPE_PP 0U |
Push-pull.
#define GD32_PUPD_GET | ( | pincfg | ) | (((pincfg) >> GD32_PUPD_POS) & GD32_PUPD_MSK) |
Obtain PUPD field from pinctrl_soc_pin_t configuration.
pincfg | pinctrl_soc_pin_t bit field value. |
#define GD32_PUPD_MSK 0x3U |
PUPD field mask.
#define GD32_PUPD_NONE 0U |
No pull-up/down.
#define GD32_PUPD_POS 29U |
PUPD field position.
#define GD32_PUPD_PULLDOWN 2U |
Pull-down.
#define GD32_PUPD_PULLUP 1U |
Pull-up.