diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-02-26 02:40:21 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-02-26 02:40:21 +0100 |
commit | c8808cf560401eff5465891407f290d6c41aa2c5 (patch) | |
tree | deb40e13050e35f8602491f4afd9efc4feac4787 /code/fe310/eos/i2s.c | |
parent | 6666a131ab36b1d96a854da80524d860f9a3884b (diff) |
event rename
Diffstat (limited to 'code/fe310/eos/i2s.c')
-rw-r--r-- | code/fe310/eos/i2s.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/code/fe310/eos/i2s.c b/code/fe310/eos/i2s.c index 83fd148..c8216ff 100644 --- a/code/fe310/eos/i2s.c +++ b/code/fe310/eos/i2s.c @@ -93,13 +93,13 @@ static uint16_t _abuf_len(EOSABuf *buf) { static void i2s_handle_evt(unsigned char type, unsigned char *buffer, uint16_t len) { switch(type & ~EOS_EVT_MASK) { - case I2S_ETYPE_MIC: + case EOS_I2S_ETYPE_MIC: if (i2s_mic_handler) i2s_mic_handler(type); clear_csr(mstatus, MSTATUS_MIE); _eos_i2s_mic_evt_enable = 1; set_csr(mstatus, MSTATUS_MIE); break; - case I2S_ETYPE_SPK: + case EOS_I2S_ETYPE_SPK: if (i2s_spk_handler) i2s_spk_handler(type); clear_csr(mstatus, MSTATUS_MIE); _eos_i2s_spk_evt_enable = 1; @@ -135,7 +135,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_handle_evt); + eos_evtq_set_handler(EOS_EVT_I2S, i2s_handle_evt); GPIO_REG(GPIO_INPUT_EN) &= ~(1 << I2S_PIN_CK); GPIO_REG(GPIO_OUTPUT_EN) |= (1 << I2S_PIN_CK); |