projects
/
lambdasoc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41edc87
)
periph.event: clear pending bits of level-triggered events.
author
Jean-François Nguyen
<jf@lambdaconcept.com>
Tue, 18 May 2021 17:11:39 +0000
(19:11 +0200)
committer
Jean-François Nguyen
<jf@lambdaconcept.com>
Mon, 31 May 2021 17:58:30 +0000
(19:58 +0200)
lambdasoc/periph/event.py
patch
|
blob
|
history
diff --git
a/lambdasoc/periph/event.py
b/lambdasoc/periph/event.py
index 53df4aae54d7990162487d6310d334e49345f70f..87b631fc230c840a67782f1edca2a96ed1f950ae 100644
(file)
--- a/
lambdasoc/periph/event.py
+++ b/
lambdasoc/periph/event.py
@@
-127,8
+127,11
@@
class InterruptSource(Elaboratable):
else:
assert False # :nocov:
- with m.If(event_trigger):
- m.d.sync += self.pending.r_data[i].eq(1)
+ if event.mode == "level":
+ m.d.sync += self.pending.r_data[i].eq(event_trigger)
+ else:
+ with m.If(event_trigger):
+ m.d.sync += self.pending.r_data[i].eq(1)
m.d.comb += self.irq.eq((self.pending.r_data & self.enable.r_data).any())