7#ifndef MCXA153_E90553C9_D130_4FFC_BA1B_364E7D24DAD1
8#define MCXA153_E90553C9_D130_4FFC_BA1B_364E7D24DAD1
16#include "./../port/Config.h"
17#include "./../port/DriveStrength.h"
18#include "./../port/DriveStrengthDouble.h"
19#include "./../port/InputBuffer.h"
20#include "./../port/Inverted.h"
21#include "./../port/Lock.h"
22#include "./../port/Mask.h"
23#include "./../port/Mux.h"
24#include "./../port/OpenDrain.h"
25#include "./../port/PassiveFilter.h"
26#include "./../port/Pull.h"
27#include "./../port/PullResistor.h"
28#include "./../port/Rate.h"
29#include "./../port/Register.h"
30#include "./../port/Shift.h"
31#include "./../port/Version.h"
32#include "./../port/VoltageRange.h"
41 extern Register &PORT0;
42 extern Register &PORT1;
43 extern Register &PORT2;
44 extern Register &PORT3;
45 extern Register *
const PORT[4];
200 virtual ~Port(
void)
override =
default;
238 uint32 verid = base.
verid;
239 result.feature =
static_cast<uint16
>(verid);
281 uint32 addr =
reinterpret_cast<uint32
>(&base.pcr[pin]);
283 *
reinterpret_cast<volatile uint16 *
>(addr) = +config;
312 uint16 pcrl = +config;
314 if (0U != (mask & 0xffffU)) base.
gpclr = ((mask & 0xffffU) << 16) | pcrl;
316 if (0U != (mask >> 16)) base.
gpchr = (mask & 0xffff0000U) | pcrl;
866 static inline constexpr uint32
PCR_PS(uint32 value) {
878 static inline constexpr uint32
PCR_PE(uint32 value) {
890 static inline constexpr uint32
PCR_PV(uint32 value) {
902 static inline constexpr uint32
PCR_SRE(uint32 value) {
914 static inline constexpr uint32
PCR_PFE(uint32 value) {
926 static inline constexpr uint32
PCR_ODE(uint32 value) {
938 static inline constexpr uint32
PCR_DSE(uint32 value) {
950 static inline constexpr uint32
PCR_DSE1(uint32 value) {
986 static inline constexpr uint32
PCR_MUX(uint32 value) {
998 static inline constexpr uint32
PCR_IBE(uint32 value) {
1010 static inline constexpr uint32
PCR_INV(uint32 value) {
1022 static inline constexpr uint32
PCR_LK(uint32 value) {
MCXA153 埠控制暫存器 (Port Control Register) 管理靜態工具類別
Definition Port.h:183
static constexpr uint32 GPCLR_GPWE1(uint32 value)
GPCLR - GPWE1.
Definition Port.h:443
static constexpr uint32 GPCHR_GPWE19(uint32 value)
GPCHR - GPWE19.
Definition Port.h:667
static constexpr uint32 GPCLR_GPWE6(uint32 value)
GPCLR - GPWE6.
Definition Port.h:503
static constexpr uint32 PCR_PE(uint32 value)
PCR - PE.
Definition Port.h:878
static constexpr uint32 GPCLR_GPWE10(uint32 value)
GPCLR - GPWE10.
Definition Port.h:551
static void setPinPullValue(Register &base, uint32 pin, uint8 value)
Configures the port pin pull value.
Definition Port.h:384
static constexpr uint32 PCR_MUX(uint32 value)
PCR - MUX.
Definition Port.h:986
static constexpr uint32 VERID_FEATURE(uint32 value)
VERID - FEATURE.
Definition Port.h:395
static constexpr uint32 PCR_SRE(uint32 value)
PCR - SRE.
Definition Port.h:902
static constexpr uint32 GPCHR_GPWE20(uint32 value)
GPCHR - GPWE20.
Definition Port.h:679
static constexpr uint32 GPCHR_GPWE16(uint32 value)
GPCHR - GPWE16.
Definition Port.h:631
static constexpr uint32 GPCHR_GPWE17(uint32 value)
GPCHR - GPWE17.
Definition Port.h:643
static void setPinConfig(Register &base, uint32 pin, const Config &config)
Sets the port PCR register.
Definition Port.h:280
static constexpr uint32 GPCLR_GPWE11(uint32 value)
GPCLR - GPWE11.
Definition Port.h:563
static constexpr uint32 GPCLR_GPWD(uint32 value)
GPCLR - GPWD.
Definition Port.h:419
static constexpr uint32 GPCHR_GPWE25(uint32 value)
GPCHR - GPWE25.
Definition Port.h:739
static constexpr uint32 GPCLR_GPWE4(uint32 value)
GPCLR - GPWE4.
Definition Port.h:479
static constexpr uint32 PCR_INV(uint32 value)
PCR - INV.
Definition Port.h:1010
static constexpr uint32 GPCHR_GPWE30(uint32 value)
GPCHR - GPWE30.
Definition Port.h:799
static constexpr uint32 GPCHR_GPWE21(uint32 value)
GPCHR - GPWE21.
Definition Port.h:691
static constexpr uint32 GPCLR_GPWE8(uint32 value)
GPCLR - GPWE8.
Definition Port.h:527
static constexpr uint32 PCR_IBE(uint32 value)
PCR - IBE.
Definition Port.h:998
static constexpr uint32 PCR_ODE(uint32 value)
PCR - ODE.
Definition Port.h:926
static constexpr uint32 GPCHR_GPWE26(uint32 value)
GPCHR - GPWE26.
Definition Port.h:751
static constexpr uint32 GPCLR_GPWE7(uint32 value)
GPCLR - GPWE7.
Definition Port.h:515
static constexpr uint32 CALIB1_NCAL(uint32 value)
CALIB1 - NCAL.
Definition Port.h:847
static constexpr uint32 PCR_DSE(uint32 value)
PCR - DSE.
Definition Port.h:938
static constexpr uint32 GPCHR_GPWE23(uint32 value)
GPCHR - GPWE23.
Definition Port.h:715
static constexpr uint32 PCR_DSE1(uint32 value)
PCR - DSE1.
Definition Port.h:950
static constexpr uint32 GPCHR_GPWE28(uint32 value)
GPCHR - GPWE28.
Definition Port.h:775
static constexpr uint32 GPCLR_GPWE2(uint32 value)
GPCLR - GPWE2.
Definition Port.h:455
static constexpr uint32 CONFIG_RANGE(uint32 value)
CONFIG - RANGE.
Definition Port.h:823
static constexpr uint32 GPCLR_GPWE15(uint32 value)
GPCLR - GPWE15.
Definition Port.h:611
static constexpr uint32 CALIB0_NCAL(uint32 value)
CALIB0 - NCAL.
Definition Port.h:831
static void secletPortVoltageRange(Register &base, VoltageRange range)
Get PORT version information.
Definition Port.h:254
static constexpr uint32 GPCHR_GPWE29(uint32 value)
GPCHR - GPWE29.
Definition Port.h:787
static void setPinDriveStrength(Register &base, uint32 pin, uint8 strength)
Configures the port pin drive strength.
Definition Port.h:355
static constexpr uint32 GPCLR_GPWE5(uint32 value)
GPCLR - GPWE5.
Definition Port.h:491
static constexpr uint32 GPCHR_GPWE18(uint32 value)
GPCHR - GPWE18.
Definition Port.h:655
static Version setVersionInfo(Register &base)
Get PORT version information.
Definition Port.h:236
static constexpr uint32 PCR_PS(uint32 value)
PCR - PS.
Definition Port.h:866
static constexpr uint32 VERID_MINOR(uint32 value)
VERID - MINOR.
Definition Port.h:403
static constexpr uint32 GPCHR_GPWE27(uint32 value)
GPCHR - GPWE27.
Definition Port.h:763
static void setPinMux(Register &base, uint32 pin, Mux mux)
Configures the pin muxing.
Definition Port.h:341
static constexpr uint32 CALIB1_PCAL(uint32 value)
CALIB1 - PCAL.
Definition Port.h:854
static constexpr uint32 CALIB0_PCAL(uint32 value)
CALIB0 - PCAL.
Definition Port.h:839
static constexpr uint32 GPCLR_GPWE14(uint32 value)
GPCLR - GPWE14.
Definition Port.h:599
static void enablePinDoubleDriveStrength(Register &base, uint32 pin, bool enable)
Enables the port pin double drive strength.
Definition Port.h:367
static constexpr uint32 GPCLR_GPWE3(uint32 value)
GPCLR - GPWE3.
Definition Port.h:467
static constexpr uint32 GPCLR_GPWE12(uint32 value)
GPCLR - GPWE12.
Definition Port.h:575
virtual ~Port(void) override=default
Destroy the object.
static constexpr uint32 PCR_PV(uint32 value)
PCR - PV.
Definition Port.h:890
static constexpr uint32 GPCHR_GPWE22(uint32 value)
GPCHR - GPWE22.
Definition Port.h:703
static constexpr uint32 GPCHR_GPWD(uint32 value)
GPCHR - GPWD.
Definition Port.h:619
static constexpr uint32 GPCLR_GPWE13(uint32 value)
GPCLR - GPWE13.
Definition Port.h:587
static constexpr uint32 GPCHR_GPWE31(uint32 value)
GPCHR - GPWE31.
Definition Port.h:811
static constexpr uint32 VERID_MAJOR(uint32 value)
VERID - MAJOR.
Definition Port.h:411
static constexpr uint32 GPCLR_GPWE0(uint32 value)
GPCLR - GPWE0.
Definition Port.h:431
static constexpr uint32 PCR_PFE(uint32 value)
PCR - PFE.
Definition Port.h:914
static void setMultiplePinsConfig(Register &base, uint32 mask, const Config &config)
Sets the port PCR register for multiple pins.
Definition Port.h:309
static constexpr uint32 GPCHR_GPWE24(uint32 value)
GPCHR - GPWE24.
Definition Port.h:727
static constexpr uint32 PCR_LK(uint32 value)
PCR - LK.
Definition Port.h:1022
static constexpr uint32 GPCLR_GPWE9(uint32 value)
GPCLR - GPWE9.
Definition Port.h:539
Definition NonInstantiable.h:29
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 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