diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-11-25 05:21:17 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-11-25 05:21:17 +0100 |
commit | 0a6233e3acf598e09dd5d676c37883cbbf444130 (patch) | |
tree | 4a6f3ec5024b8f2389086de1356c8e7333854c38 /fw/fe310/eos/i2s.c | |
parent | 6a31936e80ae2743376dcbf9d39cd92461c4deca (diff) |
spi display driver initial commit
Diffstat (limited to 'fw/fe310/eos/i2s.c')
-rw-r--r-- | fw/fe310/eos/i2s.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fw/fe310/eos/i2s.c b/fw/fe310/eos/i2s.c index 695967a..0a2742b 100644 --- a/fw/fe310/eos/i2s.c +++ b/fw/fe310/eos/i2s.c @@ -140,6 +140,9 @@ extern void _eos_i2s_start_pwm(void); void eos_i2s_init(uint8_t wakeup_cause) { eos_evtq_set_handler(EOS_EVT_I2S, i2s_handle_evt); + GPIO_REG(GPIO_OUTPUT_VAL) |= (1 << I2S_PIN_CK_SW); + GPIO_REG(GPIO_OUTPUT_VAL) &= ~((1 << I2S_PIN_CK) | (1 << I2S_PIN_CK_SR) | (1 << I2S_PIN_WS_MIC) | (1 << I2S_PIN_WS_SPK)); + GPIO_REG(GPIO_INPUT_EN) &= ~(1 << I2S_PIN_CK); GPIO_REG(GPIO_OUTPUT_EN) |= (1 << I2S_PIN_CK); GPIO_REG(GPIO_PULLUP_EN) &= ~(1 << I2S_PIN_CK); @@ -177,9 +180,6 @@ void eos_i2s_init(uint8_t wakeup_cause) { GPIO_REG(GPIO_IOF_EN) &= ~I2S_PIN_PWM; GPIO_REG(GPIO_IOF_SEL) |= I2S_PIN_PWM; - - GPIO_REG(GPIO_OUTPUT_VAL) |= (1 << I2S_PIN_CK_SW); - GPIO_REG(GPIO_OUTPUT_VAL) &= ~((1 << I2S_PIN_CK) | (1 << I2S_PIN_CK_SR) | (1 << I2S_PIN_WS_MIC) | (1 << I2S_PIN_WS_SPK)); } void eos_i2s_start(uint32_t sample_rate, unsigned char fmt) { |