mFrame
載入中...
搜尋中...
無符合項目
mcxa153::chip::port::Port 類別 參考文件

MCXA153 埠控制暫存器 (Port Control Register) 管理靜態工具類別 更多...

#include <Port.h>

類別mcxa153::chip::port::Port的繼承圖:
ufm::lang::NonInstantiable ufm::lang::Object ufm::lang::Interface

靜態公開方法(Static Public Methods)

static Version setVersionInfo (Register &base)
 Get PORT version information.
 
static void secletPortVoltageRange (Register &base, VoltageRange range)
 Get PORT version information.
 
static void setPinConfig (Register &base, uint32 pin, const Config &config)
 Sets the port PCR register.
 
static void setMultiplePinsConfig (Register &base, uint32 mask, const Config &config)
 Sets the port PCR register for multiple pins.
 
static void setPinMux (Register &base, uint32 pin, Mux mux)
 Configures the pin muxing.
 
static void setPinDriveStrength (Register &base, uint32 pin, uint8 strength)
 Configures the port pin drive strength.
 
static void enablePinDoubleDriveStrength (Register &base, uint32 pin, bool enable)
 Enables the port pin double drive strength.
 
static void setPinPullValue (Register &base, uint32 pin, uint8 value)
 Configures the port pin pull value.
 
static constexpr uint32 VERID_FEATURE (uint32 value)
 VERID - FEATURE.
 
static constexpr uint32 VERID_MINOR (uint32 value)
 VERID - MINOR.
 
static constexpr uint32 VERID_MAJOR (uint32 value)
 VERID - MAJOR.
 
static constexpr uint32 GPCLR_GPWD (uint32 value)
 GPCLR - GPWD.
 
static constexpr uint32 GPCLR_GPWE0 (uint32 value)
 GPCLR - GPWE0.
 
static constexpr uint32 GPCLR_GPWE1 (uint32 value)
 GPCLR - GPWE1.
 
static constexpr uint32 GPCLR_GPWE2 (uint32 value)
 GPCLR - GPWE2.
 
static constexpr uint32 GPCLR_GPWE3 (uint32 value)
 GPCLR - GPWE3.
 
static constexpr uint32 GPCLR_GPWE4 (uint32 value)
 GPCLR - GPWE4.
 
static constexpr uint32 GPCLR_GPWE5 (uint32 value)
 GPCLR - GPWE5.
 
static constexpr uint32 GPCLR_GPWE6 (uint32 value)
 GPCLR - GPWE6.
 
static constexpr uint32 GPCLR_GPWE7 (uint32 value)
 GPCLR - GPWE7.
 
static constexpr uint32 GPCLR_GPWE8 (uint32 value)
 GPCLR - GPWE8.
 
static constexpr uint32 GPCLR_GPWE9 (uint32 value)
 GPCLR - GPWE9.
 
static constexpr uint32 GPCLR_GPWE10 (uint32 value)
 GPCLR - GPWE10.
 
static constexpr uint32 GPCLR_GPWE11 (uint32 value)
 GPCLR - GPWE11.
 
static constexpr uint32 GPCLR_GPWE12 (uint32 value)
 GPCLR - GPWE12.
 
static constexpr uint32 GPCLR_GPWE13 (uint32 value)
 GPCLR - GPWE13.
 
static constexpr uint32 GPCLR_GPWE14 (uint32 value)
 GPCLR - GPWE14.
 
static constexpr uint32 GPCLR_GPWE15 (uint32 value)
 GPCLR - GPWE15.
 
static constexpr uint32 GPCHR_GPWD (uint32 value)
 GPCHR - GPWD.
 
static constexpr uint32 GPCHR_GPWE16 (uint32 value)
 GPCHR - GPWE16.
 
static constexpr uint32 GPCHR_GPWE17 (uint32 value)
 GPCHR - GPWE17.
 
static constexpr uint32 GPCHR_GPWE18 (uint32 value)
 GPCHR - GPWE18.
 
static constexpr uint32 GPCHR_GPWE19 (uint32 value)
 GPCHR - GPWE19.
 
static constexpr uint32 GPCHR_GPWE20 (uint32 value)
 GPCHR - GPWE20.
 
static constexpr uint32 GPCHR_GPWE21 (uint32 value)
 GPCHR - GPWE21.
 
static constexpr uint32 GPCHR_GPWE22 (uint32 value)
 GPCHR - GPWE22.
 
static constexpr uint32 GPCHR_GPWE23 (uint32 value)
 GPCHR - GPWE23.
 
static constexpr uint32 GPCHR_GPWE24 (uint32 value)
 GPCHR - GPWE24.
 
static constexpr uint32 GPCHR_GPWE25 (uint32 value)
 GPCHR - GPWE25.
 
static constexpr uint32 GPCHR_GPWE26 (uint32 value)
 GPCHR - GPWE26.
 
static constexpr uint32 GPCHR_GPWE27 (uint32 value)
 GPCHR - GPWE27.
 
static constexpr uint32 GPCHR_GPWE28 (uint32 value)
 GPCHR - GPWE28.
 
static constexpr uint32 GPCHR_GPWE29 (uint32 value)
 GPCHR - GPWE29.
 
static constexpr uint32 GPCHR_GPWE30 (uint32 value)
 GPCHR - GPWE30.
 
static constexpr uint32 GPCHR_GPWE31 (uint32 value)
 GPCHR - GPWE31.
 
static constexpr uint32 CONFIG_RANGE (uint32 value)
 CONFIG - RANGE.
 
static constexpr uint32 CALIB0_NCAL (uint32 value)
 CALIB0 - NCAL.
 
static constexpr uint32 CALIB0_PCAL (uint32 value)
 CALIB0 - PCAL.
 
static constexpr uint32 CALIB1_NCAL (uint32 value)
 CALIB1 - NCAL.
 
static constexpr uint32 CALIB1_PCAL (uint32 value)
 CALIB1 - PCAL.
 
static constexpr uint32 PCR_PS (uint32 value)
 PCR - PS.
 
static constexpr uint32 PCR_PE (uint32 value)
 PCR - PE.
 
static constexpr uint32 PCR_PV (uint32 value)
 PCR - PV.
 
static constexpr uint32 PCR_SRE (uint32 value)
 PCR - SRE.
 
static constexpr uint32 PCR_PFE (uint32 value)
 PCR - PFE.
 
static constexpr uint32 PCR_ODE (uint32 value)
 PCR - ODE.
 
static constexpr uint32 PCR_DSE (uint32 value)
 PCR - DSE.
 
static constexpr uint32 PCR_DSE1 (uint32 value)
 PCR - DSE1.
 
static constexpr uint32 PCR_MUX (uint32 value)
 PCR - MUX.
 
static constexpr uint32 PCR_IBE (uint32 value)
 PCR - IBE.
 
static constexpr uint32 PCR_INV (uint32 value)
 PCR - INV.
 
static constexpr uint32 PCR_LK (uint32 value)
 PCR - LK.
 

保護方法(Protected Methods)

virtual ~Port (void) override=default
 Destroy the object.
 
- 保護方法(Protected Methods) 繼承自 ufm::lang::NonInstantiable
 NonInstantiable (void)=delete
 禁止實例化 NonInstantiable 類別
 
 NonInstantiable (const NonInstantiable &)=delete
 禁止複製建構函式
 
virtual ~NonInstantiable (void) override=default
 Destroy the Non Instantiable object.
 
NonInstantiableoperator= (const NonInstantiable &)=delete
 
NonInstantiableoperator= (NonInstantiable &&)=delete
 

額外的繼承成員

- 公開方法(Public Methods) 繼承自 ufm::lang::Object
void * operator new (size_t n)
 使用運算子 new 分配記憶體
 
void * operator new (size_t n, void *p)
 在指定記憶體上調用運算子 new
 
virtual ufm::lang::ObjectgetObject (void) override
 取得對應的 Object 物件
 
void delay (int milliseconds) const
 延遲指定的毫秒數進行執行緒等待
 
bool equals (Object *object) const
 判斷與另一物件是否為相同參照(指標型態比較)
 
bool equals (Object &object) const
 判斷與另一物件是否為相同參照(參照型態比較)
 
void wait (void) const
 使當前線程等待直到被通知
 
bool wait (int timeout) const
 等待通知或超時
 
bool yield (void) const
 讓執行緒讓渡控制權給同優先權的下一個執行緒
 
int lock (void) const
 核心鎖定,鎖定期間禁止線程切換
 
int unlock (void) const
 核心解鎖
 
ufm::sys::ThreadcurrentThread (void) const
 取得當前執行緒指標
 
virtual int hashcode (void) const
 返回對象的哈希碼值。支持這種方法是為了散列表,如HashMap提供的那樣。
 
- 公開方法(Public Methods) 繼承自 ufm::lang::Interface
virtual ~Interface (void)=default
 虛擬析構函式
 

詳細描述

MCXA153 埠控制暫存器 (Port Control Register) 管理靜態工具類別

Port 類別提供 MCXA153 微控制器埠控制暫存器的完整操作介面。 此類別設計為靜態工具類別,無法實例化,所有功能均透過靜態函數提供, 用於配置和控制 GPIO 引腳的電氣特性、多工選擇、上下拉電阻、 驅動強度、濾波功能等詳細的引腳屬性設定。

主要功能模組包括:

引腳多工控制 (Pin Multiplexing):

  • **MUX 選擇**:支援 14 種不同的引腳功能選擇 (Alternative 0-13)
  • **功能切換**:GPIO、UART、SPI、I2C、PWM、ADC 等功能切換
  • **動態重配置**:運行時動態改變引腳功能
  • **晶片特定功能**:支援各種晶片特定的周邊功能映射

電氣特性配置:

  • 上下拉電阻 (Pull-up/Pull-down):內建可選擇的上拉/下拉電阻
  • 驅動強度 (Drive Strength):低驅動/高驅動強度選擇
  • 雙倍驅動強度 (Double Drive Strength):加強驅動能力選項
  • 開漏輸出 (Open Drain):支援開漏和推挽輸出模式
  • 轉換速率 (Slew Rate):快速/慢速邊緣轉換控制

輸入信號處理:

  • 輸入緩衝器 (Input Buffer):可控制的輸入緩衝器啟用
  • 輸入反轉 (Input Inversion):硬體信號反轉功能
  • 被動濾波器 (Passive Filter):輸入信號噪音濾波
  • **電壓範圍設定**:1.71V-3.6V 或 2.70V-3.6V 電壓範圍支援

批次配置功能:

  • 單引腳配置 (setPinConfig):配置單一引腳的所有屬性
  • 多引腳配置 (setMultiplePinsConfig):批次配置多個引腳
  • 全域控制暫存器 (GPCLR/GPCHR):原子性批次引腳設定
  • **引腳遮罩操作**:支援位元遮罩的批次操作

版本和校準功能:

  • 版本資訊查詢 (setVersionInfo):取得 PORT 模組版本資訊
  • 驅動器校準 (CALIB0/CALIB1):NMOS/PMOS 輸出驅動器校準
  • **特性規格**:查詢支援的功能規格編號

支援的埠實例:

  • **PORT0-PORT3**:四個獨立的埠控制器實例
  • **32 個引腳**:每個埠最多支援 32 個引腳配置
  • **獨立控制**:每個引腳可獨立配置所有屬性
  • **陣列存取**:提供 PORT 陣列便於批次操作

引腳配置結構:

PCR 暫存器位元欄位:

  • PS (Pull Select):上拉/下拉選擇
  • PE (Pull Enable):上下拉啟用控制
  • PV (Pull Value):上下拉電阻值選擇
  • SRE (Slew Rate Enable):轉換速率控制
  • PFE (Passive Filter Enable):被動濾波器啟用
  • ODE (Open Drain Enable):開漏輸出啟用
  • DSE (Drive Strength Enable):驅動強度控制
  • DSE1 (Double Drive Strength):雙倍驅動強度
  • MUX (Multiplexer):引腳功能多工選擇
  • IBE (Input Buffer Enable):輸入緩衝器啟用
  • INV (Invert):輸入信號反轉
  • LK (Lock):暫存器鎖定保護

全域控制功能:

  • GPCLR (Global Pin Control Low):控制引腳 0-15 的批次設定
  • GPCHR (Global Pin Control High):控制引腳 16-31 的批次設定
  • GPWD (Global Pin Write Data):全域寫入資料
  • GPWE (Global Pin Write Enable):全域寫入啟用遮罩

電壓範圍和校準:

  • **CONFIG_RANGE**:埠電壓範圍配置 (1.71-3.6V / 2.70-3.6V)
  • **CALIB0_NCAL/PCAL**:校準暫存器 0 的 NMOS/PMOS 校準
  • **CALIB1_NCAL/PCAL**:校準暫存器 1 的 NMOS/PMOS 校準

引腳鎖定機制:

  • 防止意外修改關鍵引腳配置
  • 鎖定後需要系統重設才能解鎖
  • 適用於安全關鍵應用的引腳保護

程式設計模式:

  • **型別安全配置**:使用強型別枚舉避免配置錯誤
  • **constexpr 最佳化**:編譯時位元操作,執行效率高
  • **批次操作支援**:提高多引腳配置的執行效率
  • **原子性操作**:全域控制暫存器確保配置一致性

使用範例:

// 配置單一引腳為 GPIO 輸出,高驅動強度,無上下拉
Config pinConfig;
pinConfig.pull = Pull::kDisable;
pinConfig.driveStrength = DriveStrength::kHigh;
pinConfig.openDrain = OpenDrain::kDisable;
pinConfig.mux = Mux::kGpio;
Port::setPinConfig(PORT0, 5, pinConfig);
// 配置多個引腳為相同設定
uint32 pinMask = (1 << 2) | (1 << 3) | (1 << 4); // 引腳 2,3,4
Port::setMultiplePinsConfig(PORT0, pinMask, pinConfig);
// 動態改變引腳功能為 UART
Port::setPinMux(PORT0, 1, Mux::kUart);
// 設定引腳驅動強度
Port::setPinDriveStrength(PORT0, 1, DriveStrength::kHigh);
// 啟用雙倍驅動強度
// 設定電壓範圍
Port::secletPortVoltageRange(PORT0, VoltageRange::k2V70_3V60);
static void setPinConfig(Register &base, uint32 pin, const Config &config)
Sets the port PCR register.
Definition Port.h:280
static void secletPortVoltageRange(Register &base, VoltageRange range)
Get PORT version information.
Definition Port.h:254
static void setPinDriveStrength(Register &base, uint32 pin, uint8 strength)
Configures the port pin drive strength.
Definition Port.h:355
static void setPinMux(Register &base, uint32 pin, Mux mux)
Configures the pin muxing.
Definition Port.h:341
static void enablePinDoubleDriveStrength(Register &base, uint32 pin, bool enable)
Enables the port pin double drive strength.
Definition Port.h:367
static void setMultiplePinsConfig(Register &base, uint32 mask, const Config &config)
Sets the port PCR register for multiple pins.
Definition Port.h:309
PORT Pin Configuration Structure.
Definition Config.h:66
Mux mux
Pin Multiplexer Configuration.
Definition Config.h:214
DriveStrength driveStrength
Drive Strength Control.
Definition Config.h:176
此類別繼承自 NonInstantiable,無法建立實例
使用前需確保相應的 PORT 時鐘已在 MRCC 中啟用
引腳功能改變可能需要相應周邊模組的重新初始化
鎖定的引腳配置只能透過系統重設來解鎖
電壓範圍設定影響整個埠的電氣特性,需謹慎配置
校準暫存器通常由系統自動設定,手動修改需要了解硬體特性
批次操作時需要注意引腳遮罩的正確性,避免影響未預期的引腳
作者
ZxyKira
日期
2020
版本
1.0
參閱
Register PORT 暫存器結構定義
Config 引腳配置結構
Mux 引腳多工選擇枚舉
Pull 上下拉電阻配置枚舉
DriveStrength 驅動強度枚舉
VoltageRange 電壓範圍枚舉
PORT0, PORT1, PORT2, PORT3 外部全域暫存器實例

函式成員說明文件

◆ CALIB0_NCAL()

static constexpr uint32 mcxa153::chip::port::Port::CALIB0_NCAL ( uint32 value)
inlinestaticconstexpr

CALIB0 - NCAL.

Calibration 0 - Calibration of NMOS Output Driver

◆ CALIB0_PCAL()

static constexpr uint32 mcxa153::chip::port::Port::CALIB0_PCAL ( uint32 value)
inlinestaticconstexpr

CALIB0 - PCAL.

Calibration 0 - Calibration of PMOS Output Driver

◆ CALIB1_NCAL()

static constexpr uint32 mcxa153::chip::port::Port::CALIB1_NCAL ( uint32 value)
inlinestaticconstexpr

CALIB1 - NCAL.

Calibration 1 - Calibration of NMOS Output Driver

◆ CALIB1_PCAL()

static constexpr uint32 mcxa153::chip::port::Port::CALIB1_PCAL ( uint32 value)
inlinestaticconstexpr

CALIB1 - PCAL.

Calibration 1 - Calibration of PMOS Output Driver

◆ CONFIG_RANGE()

static constexpr uint32 mcxa153::chip::port::Port::CONFIG_RANGE ( uint32 value)
inlinestaticconstexpr

CONFIG - RANGE.

Configuration - Port Voltage Range

  • [0b0]1.71 V-3.6 V
  • [0b1]2.70 V-3.6 V

◆ enablePinDoubleDriveStrength()

static void mcxa153::chip::port::Port::enablePinDoubleDriveStrength ( Register & base,
uint32 pin,
bool enable )
inlinestatic

Enables the port pin double drive strength.

參數
basePORT peripheral base pointer.
pinPORT pin number.
enablePORT pin drive strength configuration.

◆ GPCHR_GPWD()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWD ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWD.

Global Pin Control High - Global Pin Write Data

◆ GPCHR_GPWE16()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE16 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE16.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE17()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE17 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE17.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE18()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE18 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE18.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE19()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE19 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE19.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE20()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE20 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE20.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE21()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE21 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE21.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE22()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE22 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE22.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE23()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE23 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE23.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE24()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE24 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE24.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE25()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE25 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE25.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE26()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE26 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE26.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE27()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE27 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE27.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE28()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE28 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE28.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE29()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE29 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE29.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE30()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE30 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE30.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCHR_GPWE31()

static constexpr uint32 mcxa153::chip::port::Port::GPCHR_GPWE31 ( uint32 value)
inlinestaticconstexpr

GPCHR - GPWE31.

Global Pin Control High - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWD()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWD ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWD.

Global Pin Control Low - Global Pin Write Data

◆ GPCLR_GPWE0()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE0 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE0.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE1()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE1 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE1.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE10()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE10 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE10.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE11()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE11 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE11.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE12()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE12 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE12.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE13()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE13 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE13.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE14()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE14 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE14.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE15()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE15 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE15.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE2()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE2 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE2.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE3()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE3 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE3.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE4()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE4 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE4.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE5()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE5 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE5.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE6()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE6 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE6.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE7()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE7 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE7.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE8()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE8 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE8.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ GPCLR_GPWE9()

static constexpr uint32 mcxa153::chip::port::Port::GPCLR_GPWE9 ( uint32 value)
inlinestaticconstexpr

GPCLR - GPWE9.

Global Pin Control Low - Global Pin Write Enable

  • [0b0]Not updated
  • [0b1]Updated

◆ PCR_DSE()

static constexpr uint32 mcxa153::chip::port::Port::PCR_DSE ( uint32 value)
inlinestaticconstexpr

PCR - DSE.

Pin Control 0..Pin Control 31 - Drive Strength Enable

  • [0b0]Low
  • [0b1]High

◆ PCR_DSE1()

static constexpr uint32 mcxa153::chip::port::Port::PCR_DSE1 ( uint32 value)
inlinestaticconstexpr

PCR - DSE1.

Pin Control 0..Pin Control 31 - Drive Strength Enable

  • [0b0]Normal
  • [0b1]Double

◆ PCR_IBE()

static constexpr uint32 mcxa153::chip::port::Port::PCR_IBE ( uint32 value)
inlinestaticconstexpr

PCR - IBE.

Pin Control 0..Pin Control 31 - Input Buffer Enable

  • [0b0]Disables
  • [0b1]Enables

◆ PCR_INV()

static constexpr uint32 mcxa153::chip::port::Port::PCR_INV ( uint32 value)
inlinestaticconstexpr

PCR - INV.

Pin Control 0..Pin Control 31 - Invert Input

  • [0b0]Does not invert
  • [0b1]Inverts

◆ PCR_LK()

static constexpr uint32 mcxa153::chip::port::Port::PCR_LK ( uint32 value)
inlinestaticconstexpr

PCR - LK.

Pin Control 0..Pin Control 31 - Lock Register

  • [0b0]Does not lock
  • [0b1]Locks

◆ PCR_MUX()

static constexpr uint32 mcxa153::chip::port::Port::PCR_MUX ( uint32 value)
inlinestaticconstexpr

PCR - MUX.

Pin Control 0..Pin Control 31 - Pin Multiplex Control

  • [0b0000]Alternative 0 (GPIO)
  • [0b0001]Alternative 1 (chip-specific)
  • [0b0010]Alternative 2 (chip-specific)
  • [0b0011]Alternative 3 (chip-specific)
  • [0b0100]Alternative 4 (chip-specific)
  • [0b0101]Alternative 5 (chip-specific)
  • [0b0110]Alternative 6 (chip-specific)
  • [0b0111]Alternative 7 (chip-specific)
  • [0b1000]Alternative 8 (chip-specific)
  • [0b1001]Alternative 9 (chip-specific)
  • [0b1010]Alternative 10 (chip-specific)
  • [0b1011]Alternative 11 (chip-specific)
  • [0b1100]Alternative 12 (chip-specific)
  • [0b1101]Alternative 13 (chip-specific)

◆ PCR_ODE()

static constexpr uint32 mcxa153::chip::port::Port::PCR_ODE ( uint32 value)
inlinestaticconstexpr

PCR - ODE.

Pin Control 0..Pin Control 31 - Open Drain Enable

  • [0b0]Disables
  • [0b1]Enables

◆ PCR_PE()

static constexpr uint32 mcxa153::chip::port::Port::PCR_PE ( uint32 value)
inlinestaticconstexpr

PCR - PE.

Pin Control 0..Pin Control 31 - Pull Enable

  • [0b0]Disables
  • [0b1]Enables

◆ PCR_PFE()

static constexpr uint32 mcxa153::chip::port::Port::PCR_PFE ( uint32 value)
inlinestaticconstexpr

PCR - PFE.

Pin Control 0..Pin Control 31 - Passive Filter Enable

  • [0b0]Disables
  • [0b1]Enables

◆ PCR_PS()

static constexpr uint32 mcxa153::chip::port::Port::PCR_PS ( uint32 value)
inlinestaticconstexpr

PCR - PS.

Pin Control 0..Pin Control 31 - Pull Select

  • [0b0]Enables internal pulldown resistor
  • [0b1]Enables internal pullup resistor

◆ PCR_PV()

static constexpr uint32 mcxa153::chip::port::Port::PCR_PV ( uint32 value)
inlinestaticconstexpr

PCR - PV.

Pin Control 0..Pin Control 31 - Pull Value

  • [0b0]Low
  • [0b1]High

◆ PCR_SRE()

static constexpr uint32 mcxa153::chip::port::Port::PCR_SRE ( uint32 value)
inlinestaticconstexpr

PCR - SRE.

Pin Control 0..Pin Control 31 - Slew Rate Enable

  • [0b0]Fast
  • [0b1]Slow

◆ secletPortVoltageRange()

static void mcxa153::chip::port::Port::secletPortVoltageRange ( Register & base,
VoltageRange range )
inlinestatic

Get PORT version information.

: PORTA_CONFIG[RANGE] controls the voltage ranges of Port A, B, and C. Read or write PORTB_CONFIG[RANGE] and PORTC_CONFIG[RANGE] does not take effect.
參數
basePORT peripheral base pointer
rangeport voltage range

◆ setMultiplePinsConfig()

static void mcxa153::chip::port::Port::setMultiplePinsConfig ( Register & base,
uint32 mask,
const Config & config )
inlinestatic

Sets the port PCR register for multiple pins.

This is an example to define input pins or output pins PCR configuration.

Define a digital input pin PCR configuration
port_pin_config_t config = {
kPORT_PullUp ,
kPORT_PullEnable,
kPORT_FastSlewRate,
kPORT_PassiveFilterDisable,
kPORT_OpenDrainDisable,
kPORT_LowDriveStrength,
kPORT_MuxAsGpio,
kPORT_UnlockRegister,
};
參數
basePORT peripheral base pointer.
maskPORT pin number macro.
configPORT PCR register configuration structure.

◆ setPinConfig()

static void mcxa153::chip::port::Port::setPinConfig ( Register & base,
uint32 pin,
const Config & config )
inlinestatic

Sets the port PCR register.

This is an example to define an input pin or output pin PCR configuration.

// Define a digital input pin PCR configuration
port_pin_config_t config = {
kPORT_PullUp,
kPORT_FastSlewRate,
kPORT_PassiveFilterDisable,
kPORT_OpenDrainDisable,
kPORT_LowDriveStrength,
kPORT_MuxAsGpio,
kPORT_UnLockRegister,
};
參數
basePORT peripheral base pointer.
pinPORT pin number.
configPORT PCR register configuration structure.

◆ setPinDriveStrength()

static void mcxa153::chip::port::Port::setPinDriveStrength ( Register & base,
uint32 pin,
uint8 strength )
inlinestatic

Configures the port pin drive strength.

參數
basePORT peripheral base pointer.
pinPORT pin number.
strengthPORT pin drive strength
  • #kPORT_LowDriveStrength = 0U - Low-drive strength is configured.
  • #kPORT_HighDriveStrength = 1U - High-drive strength is configured.

◆ setPinMux()

static void mcxa153::chip::port::Port::setPinMux ( Register & base,
uint32 pin,
Mux mux )
inlinestatic

Configures the pin muxing.

參數
basePORT peripheral base pointer.
pinPORT pin number.
muxpin muxing slot selection.
  • #kPORT_PinDisabledOrAnalog: Pin disabled or work in analog function.
  • #kPORT_MuxAsGpio : Set as GPIO.
  • #kPORT_MuxAlt2 : chip-specific.
  • #kPORT_MuxAlt3 : chip-specific.
  • #kPORT_MuxAlt4 : chip-specific.
  • #kPORT_MuxAlt5 : chip-specific.
  • #kPORT_MuxAlt6 : chip-specific.
  • #kPORT_MuxAlt7 : chip-specific.
: This function is NOT recommended to use together with the PORT_SetPinsConfig, because the PORT_SetPinsConfig need to configure the pin mux anyway (Otherwise the pin mux is reset to zero : kPORT_PinDisabledOrAnalog). This function is recommended to use to reset the pin mux

◆ setPinPullValue()

static void mcxa153::chip::port::Port::setPinPullValue ( Register & base,
uint32 pin,
uint8 value )
inlinestatic

Configures the port pin pull value.

參數
basePORT peripheral base pointer.
pinPORT pin number.
valuePORT pin pull value
  • #kPORT_LowPullResistor = 0U - Low internal pull resistor value is selected.
  • #kPORT_HighPullResistor = 1U - High internal pull resistor value is selected.

◆ setVersionInfo()

static Version mcxa153::chip::port::Port::setVersionInfo ( Register & base)
inlinestatic

Get PORT version information.

參數
basePORT peripheral base pointer
infoPORT version information

◆ VERID_FEATURE()

static constexpr uint32 mcxa153::chip::port::Port::VERID_FEATURE ( uint32 value)
inlinestaticconstexpr

VERID - FEATURE.

Version ID - Feature Specification Number

  • [0b0000000000000000]Basic implementation

◆ VERID_MAJOR()

static constexpr uint32 mcxa153::chip::port::Port::VERID_MAJOR ( uint32 value)
inlinestaticconstexpr

VERID - MAJOR.

Version ID - Major Version Number

◆ VERID_MINOR()

static constexpr uint32 mcxa153::chip::port::Port::VERID_MINOR ( uint32 value)
inlinestaticconstexpr

VERID - MINOR.

Version ID - Minor Version Number


此類別(class) 文件是由下列檔案中產生: