This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:common:applications:gpio:irq [2022/07/05 05:06] frank fixup syntax error |
products:sbc:common:applications:gpio:irq [2022/08/07 22:41] (current) olivia [Introduction] |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | This document mainly introduces how to use GPIO interrupts on Khadas SBC. You will know how to use GPIO interrupts with the GPIO number test program. | + | The page leads you to use GPIO interrupts with the GPIO number test program |
<WRAP important > | <WRAP important > | ||
- | Use '' | + | Here we use '' |
</ | </ | ||
===== Hardware Connection ===== | ===== Hardware Connection ===== | ||
- | Connect the physical pins '' | + | Connect the physical pins '' |
===== System Configuration ===== | ===== System Configuration ===== | ||
Line 17: | Line 17: | ||
Get '' | Get '' | ||
- | Refer [[/ | + | Refer to [[/ |
Export GPIO | Export GPIO | ||
- | ```sh | + | ```shell |
$ echo 433 | sudo tee / | $ echo 433 | sudo tee / | ||
``` | ``` | ||
<WRAP info > | <WRAP info > | ||
- | Please use gpio readall to check the status of GPIOH_6, if it is not shown as a normal GPIO, you need to remove uart3 from overlays in the / | + | Please use '' |
Check the [[products: | Check the [[products: | ||
</ | </ | ||
Line 210: | Line 210: | ||
Compile the source code | Compile the source code | ||
- | ```sh | + | ```shell |
$ gcc -o gpio_interrupts gpio_interrupts.c | $ gcc -o gpio_interrupts gpio_interrupts.c | ||
``` | ``` | ||
Line 218: | Line 218: | ||
The test code running format is as follows: | The test code running format is as follows: | ||
- | ```sh | + | ```shell |
$ sudo ./ | $ sudo ./ | ||
Line 225: | Line 225: | ||
Run test: | Run test: | ||
- | ```sh | + | ```shell |
$ sudo ./ | $ sudo ./ | ||
. | . |