This is the documentation for the latest (main) development branch. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Gpio Read

Overview

After starting this application, perform the following actions:

  1. Initialize gpio

  2. Configure gpio and add gpio interrupts

  3. Use interrupt triggering

Environmental requirements

Please note that gpio should be configured using devcie tree as a device, but due to the characteristics of iomux, IO configuration for pins is also provided

Building and flashing

Example Location: examples/peripheral/gpio

compile, burn, and more, see: get started

Running result

Successfully running will output the following logs

D/dt              [0.090] add device gpio
I/gpio            [0.094] WM_GPIO_DEFINE3 data is set high
I/gpio            [1.098] WM_GPIO_DEFINE3 data is set low
I/gpio            [2.102] gpio init ok
I/gpio            [19.178] GPIO[4] intr, val: 1
I/gpio            [21.214] GPIO[4] intr, val: 0