mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2026-07-13 23:15:39 +00:00
add examples
This commit is contained in:
parent
265d41b6a3
commit
4128624f93
112 changed files with 158017 additions and 0 deletions
21
RTL00_SDKV35a/example_sources/gpio_level_irq/readme.txt
Normal file
21
RTL00_SDKV35a/example_sources/gpio_level_irq/readme.txt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Example Description
|
||||
|
||||
This example describes how to implement high/low level trigger on 1 gpio pin.
|
||||
|
||||
Pin name PC_4 and PC_5 map to GPIOC_4 and GPIOC_5:
|
||||
Connect PC_4 and PC_5
|
||||
- PC_4 as gpio input high/low level trigger.
|
||||
- PC_5 as gpio output
|
||||
|
||||
In this example, PC_5 is signal source that change level to high and low periodically.
|
||||
|
||||
PC_4 setup to listen low level events in initial.
|
||||
When PC_4 catch low level events, it disable the irq to avoid receiving duplicate events.
|
||||
(NOTE: the level events will keep invoked if level keeps in same level)
|
||||
|
||||
Then PC_4 is configured to listen high level events and enable irq.
|
||||
As PC_4 catches high level events, it changes back to listen low level events.
|
||||
|
||||
Thus PC_4 can handle both high/low level events.
|
||||
|
||||
In this example, you will see log that prints high/low level event periodically.
|
||||
Loading…
Add table
Add a link
Reference in a new issue