Module lpc82x_hal::gpio [−][src]
API for General Purpose I/O (GPIO)
The entry point to this API is GPIO
. It can be used to initialize the
peripheral, and is required by instances of Pin
for GPIO functionality.
All Pin
instances live in the swm
module.
The GPIO peripheral is described in the user manual, chapter 9.
Examples
Initialize a GPIO pin and set its output to HIGH:
use lpc82x_hal::prelude::*; use lpc82x_hal::Peripherals; let mut p = Peripherals::take().unwrap(); let swm = p.swm.split(); let pio0_12 = swm.pins.pio0_12 .into_gpio_pin(&p.gpio) .into_output() .set_high();
Please refer to the examples in the repository for more example code.
Modules
direction |
Contains types to indicate the direction of GPIO pins |
Structs
GPIO |
Interface to the GPIO peripheral |