summaryrefslogtreecommitdiff
path: root/code/fe310/eos/i2s.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-01-28 19:25:20 +0100
committerUros Majstorovic <majstor@majstor.org>2020-01-28 19:25:20 +0100
commit15bddabc5cbe0e751fadcaaa7f7c7c36bca61331 (patch)
treef1c1351a9ed0acb426914ee92cd7b2b917fd9ee4 /code/fe310/eos/i2s.c
parent445d72abf487dc325ccbde1e3a12d1c4cf695a6a (diff)
eve logng press event added
Diffstat (limited to 'code/fe310/eos/i2s.c')
-rw-r--r--code/fe310/eos/i2s.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/code/fe310/eos/i2s.c b/code/fe310/eos/i2s.c
index 8b878b3..5b8d2cb 100644
--- a/code/fe310/eos/i2s.c
+++ b/code/fe310/eos/i2s.c
@@ -136,7 +136,7 @@ static void _spk_vol_set(uint8_t vol) {
extern void _eos_i2s_start_pwm(void);
void eos_i2s_init(void) {
- eos_evtq_set_handler(EOS_EVT_AUDIO, i2s_handler_evt);
+ eos_evtq_set_handler(EOS_EVT_AUDIO, i2s_handler_evt, 0);
GPIO_REG(GPIO_INPUT_EN) &= ~(1 << I2S_PIN_CK);
GPIO_REG(GPIO_OUTPUT_EN) |= (1 << I2S_PIN_CK);
@@ -272,7 +272,7 @@ void eos_i2s_mic_set_handler(eos_i2s_fptr_t wm_handler, uint8_t flags) {
i2s_mic_handler = wm_handler;
set_csr(mstatus, MSTATUS_MIE);
- if (flags) eos_evtq_set_flags(EOS_EVT_AUDIO | I2S_ETYPE_MIC, flags);
+ eos_evtq_set_hflags(EOS_EVT_AUDIO | I2S_ETYPE_MIC, flags);
}
void eos_i2s_mic_set_wm(uint16_t wm) {
@@ -348,7 +348,7 @@ void eos_i2s_spk_set_handler(eos_i2s_fptr_t wm_handler, uint8_t flags) {
i2s_spk_handler = wm_handler;
set_csr(mstatus, MSTATUS_MIE);
- if (flags) eos_evtq_set_flags(EOS_EVT_AUDIO | I2S_ETYPE_SPK, flags);
+ eos_evtq_set_hflags(EOS_EVT_AUDIO | I2S_ETYPE_SPK, flags);
}
void eos_i2s_spk_set_wm(uint16_t wm) {