驱动模式本质上是GPIO可以采用的特定电气配置。GPIOs支持7种主要驱动器模式:
• High Impedance 高阻抗 – Used for mainly for analog pins ,主要用于模拟引脚
• Resistive Pull Up 电阻上拉 – Able to drive the pin low, but only pulls the pin high through a resistor so that an external source can force the pin low
• Resistive Pull Down 电阻下拉 – Able to drive the pin high, but only pulls the pin low through a resistor so that an external source can force the pin high
• Open Drain Drives Low 开漏驱动低电平 – Able to drive the pin low, can be pulled high externally
• Open Drain Drives High 开漏驱动高电平 – Able to drive the pin high, can be pulled low externally
• Strong – Used for digital outputs, able to pull the pin high or low
• Resistive Pull Up and Down 电阻上下拉 – DC biases the pin, useful for some analog pins. Also allows external sources to force the pin to the opposite state.
GPIO常会见到两种模式:开漏(open-drain,漏极开路)和推挽(push-pull)。
Push-Pull推挽输原理&