portInputRegister()
GPIO ポートのポート入力データレジスタ(GPIOx_IDR)を取得します。
書式
digitalPinToBitMask(port)
port: GPIOポート(gpio_dev型のポインタ)
詳細説明
GPIO ポートのポート入力データレジスタ(GPIOx_IDR)を取得します(xはA~G)。
本関数はマクロ関数です。
STM32F1/variants/generic_gd32f103c/variant.hには次のように定義されています。
code:variant.h
#define portInputRegister(port) ( &(port->regs->IDR) )
GPIO ポート デバイスについては、GPIO port and AFIO support(gpio.h) libmaple/gpio.h を参照して下さい。
関連項目
digitalPinToPort() ピン番号に対応するGPIOポート デバイスを取得
digitalPinToBitMask() GPIOポートのピンのGPIOビット番号(0~15)を取得
portOutputRegister() GPIOポート出力データレジスタ(GPIOx_ODR)を取得
portInputRegister() GPIOポート入力データレジスタ(GPIOx_IDR)を取得
portSetRegister() GPIO ポートビットセット/リセットレジスタ(GPIOx_BSRR)を取得
portClearRegister() GPIO ポートビットリセットレジスタ(GPIOx_BRR)を取得
portConfigRegister() GPIO ポート設定レジスタ(下位)(GPIOx_CRL)を取得
GPIO port and AFIO support(gpio.h) libmaple/gpio.h
License and Attribution: Portions of this page were adapted from the Arduino Reference Documentation, which is released under a Creative Commons Attribution-ShareAlike 3.0 License.
このドキュメントはleafLabs, LLC.が執筆し、たま吉が翻訳・一部加筆修正したものです。
Arduino STM32 リファレンス 日本語版 に戻る