2016-12-24 12:45:57 +00:00
|
|
|
# Example: GPIO
|
|
|
|
|
2017-11-07 13:57:35 +00:00
|
|
|
This test code shows how to configure gpio and how to use gpio interrupt.
|
2016-12-24 12:45:57 +00:00
|
|
|
|
2017-11-07 13:57:35 +00:00
|
|
|
## GPIO functions:
|
2016-12-24 12:45:57 +00:00
|
|
|
|
|
|
|
* GPIO18: output
|
|
|
|
* GPIO19: output
|
|
|
|
* GPIO4: input, pulled up, interrupt from rising edge and falling edge
|
|
|
|
* GPIO5: input, pulled up, interrupt from rising edge.
|
2017-11-07 13:57:35 +00:00
|
|
|
|
|
|
|
## Test:
|
2016-12-24 12:45:57 +00:00
|
|
|
* Connect GPIO18 with GPIO4
|
|
|
|
* Connect GPIO19 with GPIO5
|
|
|
|
* Generate pulses on GPIO18/19, that triggers interrupt on GPIO4/5
|