The latest development version of this page may be more current than this released 0.4.0 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