LoginSignup
0
2

More than 5 years have passed since last update.

mbedのGPIOをプルアップ / プルダウン / オープンドレインにする

Last updated at Posted at 2017-04-09

DigitalOut クラスの代わりに DigitalInOut クラスを使う。

#include "mbed.h"

DigitalInOut resetPin(PC_6, PIN_OUTPUT, OpenDrain, 0);

resetPin = 1;
wait(0.5);
resetPin = 0;

OpenDrain の部分を PullUp, PullDown に置き換えるとプルアップ・プルダウンにできる(マイコンによるのかな?)。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2