afio_cfg_debug_ports()
JTAGおよびSWデバッグポートを有効または無効にします。
書式
void afio_cfg_debug_ports(afio_debug_cfg config) (ヘッダファイル series/gpio.h)
引数
config:デバッグポートの設定
JTAGおよびSWデバッグポートを有効または無効にします。
引数configに指定する値により、次の設定を行うことが出来ます。
AFIO_DEBUG_FULL_SWJ :SW(Serial Wire)とJTAGデバッグ有効
AFIO_DEBUG_FULL_SWJ_NO_NJRST :SW(Serial Wire)とJTAGでバグう有効、ただしNJTRSTは無効
AFIO_DEBUG_SW_ONLY :SW'Serial Wire debug)のみ (JTAG無効, SW-DP有効)
AFIO_DEBUG_NONE :デバッグ無効、全てのJTAGとSWピンはGPIOピンとして自由に利用出来ます
利用例
デバッグを無効にし、JTAGとSWピンをGPIOピンとして自由に利用出来るようにします。
code:sample.ino
void setup() {
afio_cfg_debug_ports(AFIO_DEBUG_NONE);
}
void loop() {
// Now you can use the debug port pins (the pins on the JTAG
// header on the Maple) as ordinary pins.
}
関連項目
enableDebugPorts()
disableDebugPorts()
JTAG
GPIO port and AFIO support(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 リファレンス 日本語版 に戻る