7#ifndef MCXA153_E90553C9_D130_4FFC_BA1B_364E7D24DAD1
8#define MCXA153_E90553C9_D130_4FFC_BA1B_364E7D24DAD1
16#include "./../Processor.h"
17#include "./../port/Config.h"
18#include "./../port/DriveStrength.h"
19#include "./../port/DriveStrengthDouble.h"
20#include "./../port/InputBuffer.h"
21#include "./../port/Inverted.h"
22#include "./../port/Lock.h"
23#include "./../port/Mask.h"
24#include "./../port/Mux.h"
25#include "./../port/OpenDrain.h"
26#include "./../port/PassiveFilter.h"
27#include "./../port/Pull.h"
28#include "./../port/PullResistor.h"
29#include "./../port/Rate.h"
30#include "./../port/Register.h"
31#include "./../port/Shift.h"
32#include "./../port/Version.h"
33#include "./../port/VoltageRange.h"
43 Register*
const PORT0 =
46 Register*
const PORT1 =
49 Register*
const PORT2 =
52 Register*
const PORT3 =
55 Register*
const PORT[4] = {PORT0, PORT1, PORT2, PORT3};
210 virtual ~Port(
void)
override =
default;
248 uint32 verid = base->
verid;
249 result.feature =
static_cast<uint16
>(verid);
291 uint32 addr =
reinterpret_cast<uint32
>(&base->pcr[pin]);
293 *
reinterpret_cast<volatile uint16*
>(addr) = +config;
322 uint16 pcrl = +config;
324 if (0U != (mask & 0xffffU)) base->
gpclr = ((mask & 0xffffU) << 16) | pcrl;
326 if (0U != (mask >> 16)) base->
gpchr = (mask & 0xffff0000U) | pcrl;
876 static inline constexpr uint32
PCR_PS(uint32 value) {
888 static inline constexpr uint32
PCR_PE(uint32 value) {
900 static inline constexpr uint32
PCR_PV(uint32 value) {
912 static inline constexpr uint32
PCR_SRE(uint32 value) {
924 static inline constexpr uint32
PCR_PFE(uint32 value) {
936 static inline constexpr uint32
PCR_ODE(uint32 value) {
948 static inline constexpr uint32
PCR_DSE(uint32 value) {
960 static inline constexpr uint32
PCR_DSE1(uint32 value) {
996 static inline constexpr uint32
PCR_MUX(uint32 value) {
1008 static inline constexpr uint32
PCR_IBE(uint32 value) {
1020 static inline constexpr uint32
PCR_INV(uint32 value) {
1032 static inline constexpr uint32
PCR_LK(uint32 value) {
static constexpr uint32 BASE_PORT3
PORT3 配置基地址 - 引腳複用與電氣特性配置3 (0x400BF000)
Definition Processor.h:214
static constexpr uint32 BASE_PORT2
PORT2 配置基地址 - 引腳複用與電氣特性配置2 (0x400BE000)
Definition Processor.h:212
static constexpr uint32 BASE_PORT1
PORT1 配置基地址 - 引腳複用與電氣特性配置1 (0x400BD000)
Definition Processor.h:210
static constexpr uint32 BASE_PORT0
PORT0 配置基地址 - 引腳複用與電氣特性配置0 (0x400BC000)
Definition Processor.h:208
MCXA153 埠控制暫存器 (Port Control Register) 管理靜態工具類別
Definition Port.h:193
static constexpr uint32 GPCLR_GPWE1(uint32 value)
GPCLR - GPWE1.
Definition Port.h:453
static constexpr uint32 GPCHR_GPWE19(uint32 value)
GPCHR - GPWE19.
Definition Port.h:677
static constexpr uint32 GPCLR_GPWE6(uint32 value)
GPCLR - GPWE6.
Definition Port.h:513
static constexpr uint32 PCR_PE(uint32 value)
PCR - PE.
Definition Port.h:888
static constexpr uint32 GPCLR_GPWE10(uint32 value)
GPCLR - GPWE10.
Definition Port.h:561
static constexpr uint32 PCR_MUX(uint32 value)
PCR - MUX.
Definition Port.h:996
static constexpr uint32 VERID_FEATURE(uint32 value)
VERID - FEATURE.
Definition Port.h:405
static constexpr uint32 PCR_SRE(uint32 value)
PCR - SRE.
Definition Port.h:912
static constexpr uint32 GPCHR_GPWE20(uint32 value)
GPCHR - GPWE20.
Definition Port.h:689
static constexpr uint32 GPCHR_GPWE16(uint32 value)
GPCHR - GPWE16.
Definition Port.h:641
static void secletPortVoltageRange(Register *base, VoltageRange range)
Get PORT version information.
Definition Port.h:264
static constexpr uint32 GPCHR_GPWE17(uint32 value)
GPCHR - GPWE17.
Definition Port.h:653
static constexpr uint32 GPCLR_GPWE11(uint32 value)
GPCLR - GPWE11.
Definition Port.h:573
static constexpr uint32 GPCLR_GPWD(uint32 value)
GPCLR - GPWD.
Definition Port.h:429
static constexpr uint32 GPCHR_GPWE25(uint32 value)
GPCHR - GPWE25.
Definition Port.h:749
static constexpr uint32 GPCLR_GPWE4(uint32 value)
GPCLR - GPWE4.
Definition Port.h:489
static void setPinDriveStrength(Register *base, uint32 pin, uint8 strength)
Configures the port pin drive strength.
Definition Port.h:365
static constexpr uint32 PCR_INV(uint32 value)
PCR - INV.
Definition Port.h:1020
static constexpr uint32 GPCHR_GPWE30(uint32 value)
GPCHR - GPWE30.
Definition Port.h:809
static constexpr uint32 GPCHR_GPWE21(uint32 value)
GPCHR - GPWE21.
Definition Port.h:701
static constexpr uint32 GPCLR_GPWE8(uint32 value)
GPCLR - GPWE8.
Definition Port.h:537
static constexpr uint32 PCR_IBE(uint32 value)
PCR - IBE.
Definition Port.h:1008
static constexpr uint32 PCR_ODE(uint32 value)
PCR - ODE.
Definition Port.h:936
static constexpr uint32 GPCHR_GPWE26(uint32 value)
GPCHR - GPWE26.
Definition Port.h:761
static constexpr uint32 GPCLR_GPWE7(uint32 value)
GPCLR - GPWE7.
Definition Port.h:525
static constexpr uint32 CALIB1_NCAL(uint32 value)
CALIB1 - NCAL.
Definition Port.h:857
static void setPinPullValue(Register *base, uint32 pin, uint8 value)
Configures the port pin pull value.
Definition Port.h:394
static constexpr uint32 PCR_DSE(uint32 value)
PCR - DSE.
Definition Port.h:948
static constexpr uint32 GPCHR_GPWE23(uint32 value)
GPCHR - GPWE23.
Definition Port.h:725
static Version setVersionInfo(Register *base)
Get PORT version information.
Definition Port.h:246
static constexpr uint32 PCR_DSE1(uint32 value)
PCR - DSE1.
Definition Port.h:960
static constexpr uint32 GPCHR_GPWE28(uint32 value)
GPCHR - GPWE28.
Definition Port.h:785
static constexpr uint32 GPCLR_GPWE2(uint32 value)
GPCLR - GPWE2.
Definition Port.h:465
static constexpr uint32 CONFIG_RANGE(uint32 value)
CONFIG - RANGE.
Definition Port.h:833
static void enablePinDoubleDriveStrength(Register *base, uint32 pin, bool enable)
Enables the port pin double drive strength.
Definition Port.h:377
static constexpr uint32 GPCLR_GPWE15(uint32 value)
GPCLR - GPWE15.
Definition Port.h:621
static constexpr uint32 CALIB0_NCAL(uint32 value)
CALIB0 - NCAL.
Definition Port.h:841
static constexpr uint32 GPCHR_GPWE29(uint32 value)
GPCHR - GPWE29.
Definition Port.h:797
static void setPinMux(Register *base, uint32 pin, Mux mux)
Configures the pin muxing.
Definition Port.h:351
static constexpr uint32 GPCLR_GPWE5(uint32 value)
GPCLR - GPWE5.
Definition Port.h:501
static constexpr uint32 GPCHR_GPWE18(uint32 value)
GPCHR - GPWE18.
Definition Port.h:665
static constexpr uint32 PCR_PS(uint32 value)
PCR - PS.
Definition Port.h:876
static constexpr uint32 VERID_MINOR(uint32 value)
VERID - MINOR.
Definition Port.h:413
static constexpr uint32 GPCHR_GPWE27(uint32 value)
GPCHR - GPWE27.
Definition Port.h:773
static constexpr uint32 CALIB1_PCAL(uint32 value)
CALIB1 - PCAL.
Definition Port.h:864
static constexpr uint32 CALIB0_PCAL(uint32 value)
CALIB0 - PCAL.
Definition Port.h:849
static constexpr uint32 GPCLR_GPWE14(uint32 value)
GPCLR - GPWE14.
Definition Port.h:609
static void setPinConfig(Register *base, uint32 pin, const Config &config)
Sets the port PCR register.
Definition Port.h:290
static constexpr uint32 GPCLR_GPWE3(uint32 value)
GPCLR - GPWE3.
Definition Port.h:477
static constexpr uint32 GPCLR_GPWE12(uint32 value)
GPCLR - GPWE12.
Definition Port.h:585
virtual ~Port(void) override=default
Destroy the object.
static constexpr uint32 PCR_PV(uint32 value)
PCR - PV.
Definition Port.h:900
static constexpr uint32 GPCHR_GPWE22(uint32 value)
GPCHR - GPWE22.
Definition Port.h:713
static constexpr uint32 GPCHR_GPWD(uint32 value)
GPCHR - GPWD.
Definition Port.h:629
static constexpr uint32 GPCLR_GPWE13(uint32 value)
GPCLR - GPWE13.
Definition Port.h:597
static constexpr uint32 GPCHR_GPWE31(uint32 value)
GPCHR - GPWE31.
Definition Port.h:821
static constexpr uint32 VERID_MAJOR(uint32 value)
VERID - MAJOR.
Definition Port.h:421
static constexpr uint32 GPCLR_GPWE0(uint32 value)
GPCLR - GPWE0.
Definition Port.h:441
static constexpr uint32 PCR_PFE(uint32 value)
PCR - PFE.
Definition Port.h:924
static constexpr uint32 GPCHR_GPWE24(uint32 value)
GPCHR - GPWE24.
Definition Port.h:737
static void setMultiplePinsConfig(Register *base, uint32 mask, const Config &config)
Sets the port PCR register for multiple pins.
Definition Port.h:319
static constexpr uint32 PCR_LK(uint32 value)
PCR - LK.
Definition Port.h:1032
static constexpr uint32 GPCLR_GPWE9(uint32 value)
GPCLR - GPWE9.
Definition Port.h:549
Definition NonInstantiable.h:29
Definition port/Config.h:36
VoltageRange
GPIO Port Operating Voltage Range Configuration.
Definition VoltageRange.h:73
Mux
GPIO Pin Multiplexer (MUX) Function Selection.
Definition chip/port/Mux.h:72
@ GPCLR_GPWE13
GPCLR_GPWE13 - Global Pin Write Enable.
@ PCR_IBE
PCR_IBE - Input Buffer Enable.
@ GPCLR_GPWE15
GPCLR_GPWE15 - Global Pin Write Enable.
@ GPCLR_GPWE8
GPCLR_GPWE8 - Global Pin Write Enable.
@ PCR_DSE
PCR_DSE - Drive Strength Enable.
@ GPCLR_GPWE3
GPCLR_GPWE3 - Global Pin Write Enable.
@ VERID_MINOR
VERID_MINOR - Minor Version Number.
@ PCR_PFE
PCR_PFE - Passive Filter Enable.
@ GPCHR_GPWE25
GPCHR_GPWE25 - Global Pin Write Enable.
@ GPCHR_GPWE23
GPCHR_GPWE23 - Global Pin Write Enable.
@ PCR_PS
PCR_PS - Pull Select.
@ GPCLR_GPWE5
GPCLR_GPWE5 - Global Pin Write Enable.
@ GPCHR_GPWE24
GPCHR_GPWE24 - Global Pin Write Enable.
@ GPCHR_GPWE22
GPCHR_GPWE22 - Global Pin Write Enable.
@ CALIB1_NCAL
CALIB1_NCAL - Calibration of NMOS Output Driver.
@ GPCLR_GPWE10
GPCLR_GPWE10 - Global Pin Write Enable.
@ GPCHR_GPWE30
GPCHR_GPWE30 - Global Pin Write Enable.
@ GPCHR_GPWD
GPCHR_GPWD - Global Pin Write Data.
@ CALIB0_PCAL
CALIB0_PCAL - Calibration of PMOS Output Driver.
@ GPCHR_GPWE20
GPCHR_GPWE20 - Global Pin Write Enable.
@ PCR_INV
PCR_INV - Invert Input.
@ GPCHR_GPWE31
GPCHR_GPWE31 - Global Pin Write Enable.
@ GPCLR_GPWE2
GPCLR_GPWE2 - Global Pin Write Enable.
@ PCR_ODE
PCR_ODE - Open Drain Enable.
@ GPCLR_GPWE1
GPCLR_GPWE1 - Global Pin Write Enable.
@ VERID_FEATURE
VERID_FEATURE - Feature Specification Number.
@ GPCLR_GPWE11
GPCLR_GPWE11 - Global Pin Write Enable.
@ GPCLR_GPWE7
GPCLR_GPWE7 - Global Pin Write Enable.
@ PCR_SRE
PCR_SRE - Slew Rate Enable.
@ GPCLR_GPWE12
GPCLR_GPWE12 - Global Pin Write Enable.
@ GPCLR_GPWE14
GPCLR_GPWE14 - Global Pin Write Enable.
@ PCR_PV
PCR_PV - Pull Value.
@ PCR_MUX
PCR_MUX - Pin Multiplex Control.
@ GPCHR_GPWE28
GPCHR_GPWE28 - Global Pin Write Enable.
@ GPCHR_GPWE27
GPCHR_GPWE27 - Global Pin Write Enable.
@ GPCHR_GPWE16
GPCHR_GPWE16 - Global Pin Write Enable.
@ GPCHR_GPWE19
GPCHR_GPWE19 - Global Pin Write Enable.
@ CALIB0_NCAL
CALIB0_NCAL - Calibration of NMOS Output Driver.
@ VERID_MAJOR
VERID_MAJOR - Major Version Number.
@ GPCLR_GPWD
GPCLR_GPWD - Global Pin Write Data.
@ GPCHR_GPWE18
GPCHR_GPWE18 - Global Pin Write Enable.
@ GPCLR_GPWE0
GPCLR_GPWE0 - Global Pin Write Enable.
@ CALIB1_PCAL
CALIB1_PCAL - Calibration of PMOS Output Driver.
@ GPCHR_GPWE17
GPCHR_GPWE17 - Global Pin Write Enable.
@ GPCLR_GPWE9
GPCLR_GPWE9 - Global Pin Write Enable.
@ PCR_LK
PCR_LK - Lock Register.
@ GPCLR_GPWE4
GPCLR_GPWE4 - Global Pin Write Enable.
@ PCR_DSE1
PCR_DSE1 - Drive Strength Enable.
@ PCR_PE
PCR_PE - Pull Enable.
@ GPCHR_GPWE26
GPCHR_GPWE26 - Global Pin Write Enable.
@ CONFIG_RANGE
CONFIG_RANGE - Port Voltage Range.
@ GPCHR_GPWE29
GPCHR_GPWE29 - Global Pin Write Enable.
@ GPCHR_GPWE21
GPCHR_GPWE21 - Global Pin Write Enable.
@ GPCLR_GPWE6
GPCLR_GPWE6 - Global Pin Write Enable.
@ GPCLR_GPWE13
GPCLR - GPWE13.
@ GPCLR_GPWE15
GPCLR - GPWE15.
@ GPCLR_GPWE8
GPCLR - GPWE8.
@ GPCLR_GPWE3
GPCLR - GPWE3.
@ VERID_MINOR
VERID - MINOR.
@ GPCHR_GPWE25
GPCHR - GPWE25.
@ GPCHR_GPWE23
GPCHR - GPWE23.
@ GPCLR_GPWE5
GPCLR - GPWE5.
@ GPCHR_GPWE24
GPCHR - GPWE24.
@ GPCHR_GPWE22
GPCHR - GPWE22.
@ CALIB1_NCAL
CALIB1 - NCAL.
@ GPCLR_GPWE10
GPCLR - GPWE10.
@ GPCHR_GPWE30
GPCHR - GPWE30.
@ GPCHR_GPWD
GPCHR - GPWD.
@ CALIB0_PCAL
CALIB0 - PCAL.
@ GPCHR_GPWE20
GPCHR - GPWE20.
@ GPCHR_GPWE31
GPCHR - GPWE31.
@ GPCLR_GPWE2
GPCLR - GPWE2.
@ GPCLR_GPWE1
GPCLR - GPWE1.
@ VERID_FEATURE
VERID - FEATURE.
@ GPCLR_GPWE11
GPCLR - GPWE11.
@ GPCLR_GPWE7
GPCLR - GPWE7.
@ GPCLR_GPWE12
GPCLR - GPWE12.
@ GPCLR_GPWE14
GPCLR - GPWE14.
@ GPCHR_GPWE28
GPCHR - GPWE28.
@ GPCHR_GPWE27
GPCHR - GPWE27.
@ GPCHR_GPWE16
GPCHR - GPWE16.
@ GPCHR_GPWE19
GPCHR - GPWE19.
@ CALIB0_NCAL
CALIB0 - NCAL.
@ VERID_MAJOR
VERID - MAJOR.
@ GPCLR_GPWD
GPCLR - GPWD.
@ GPCHR_GPWE18
GPCHR - GPWE18.
@ GPCLR_GPWE0
GPCLR - GPWE0.
@ CALIB1_PCAL
CALIB1 - PCAL.
@ GPCHR_GPWE17
GPCHR - GPWE17.
@ GPCLR_GPWE9
GPCLR - GPWE9.
@ GPCLR_GPWE4
GPCLR - GPWE4.
@ GPCHR_GPWE26
GPCHR - GPWE26.
@ CONFIG_RANGE
CONFIG - RANGE.
@ GPCHR_GPWE29
GPCHR - GPWE29.
@ GPCHR_GPWE21
GPCHR - GPWE21.
@ GPCLR_GPWE6
GPCLR - GPWE6.
PORT Pin Configuration Structure.
Definition port/Config.h:66
PORT (Pin Multiplexing and Control) Peripheral Register Structure.
Definition port/Register.h:53
__I uint32 verid
Version ID Register.
Definition port/Register.h:77
__IO uint32 config
Configuration Register.
Definition port/Register.h:181
__O uint32 gpchr
Global Pin Control High Register.
Definition port/Register.h:145
__O uint32 gpclr
Global Pin Control Low Register.
Definition port/Register.h:119
PORT Peripheral Version Information Structure.
Definition Version.h:54