summaryrefslogtreecommitdiff
path: root/code/fe310/eos/i2s.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2018-03-16 16:49:37 +0100
committerUros Majstorovic <majstor@majstor.org>2018-03-16 16:49:37 +0100
commitb623f680f6a7aa53de6a1d949d857b37f391c80d (patch)
tree16f5bd03a46c748dcf5baedc3f3c88ca508860a8 /code/fe310/eos/i2s.c
parentb1c3ee27894d33d9fcfca4ea4d0ccfb6d4cfc83e (diff)
fixed irq handlers for ci/sd
Diffstat (limited to 'code/fe310/eos/i2s.c')
-rw-r--r--code/fe310/eos/i2s.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/code/fe310/eos/i2s.c b/code/fe310/eos/i2s.c
index 64152dd..3b1772c 100644
--- a/code/fe310/eos/i2s.c
+++ b/code/fe310/eos/i2s.c
@@ -112,13 +112,13 @@ void eos_i2s_init(void) {
I2S_PWM_REG_CK(PWM_COUNT) = 0;
I2S_PWM_REG_CK(PWM_CMP0) = _eos_i2s_ck_period - 1;
I2S_PWM_REG_CK(PWM_CMP1) = I2S_PWM_REG_CK(PWM_CMP0) / 2;
- I2S_PWM_REG_CK(PWM_CMP2) = I2S_PWM_REG_CK(PWM_CMP0) / 2;
+ I2S_PWM_REG_CK(PWM_CMP2) = I2S_PWM_REG_CK(PWM_CMP0) / 8;
I2S_PWM_REG_WS(PWM_CFG) = 0;
I2S_PWM_REG_WS(PWM_COUNT) = 0;
I2S_PWM_REG_WS(PWM_CMP0) = _eos_i2s_ck_period * 64 - 1;
I2S_PWM_REG_WS(PWM_CMP1) = I2S_PWM_REG_WS(PWM_CMP0) / 2;
- I2S_PWM_REG_WS(PWM_CMP2) = I2S_PWM_REG_WS(PWM_CMP0) - 1024;
+ I2S_PWM_REG_WS(PWM_CMP2) = I2S_PWM_REG_WS(PWM_CMP0) - _eos_i2s_ck_period;
eos_intr_set(I2S_IRQ_SD_ID, I2S_IRQ_SD_PRIORITY, NULL);
eos_intr_set(I2S_IRQ_CK_ID, I2S_IRQ_CK_PRIORITY, NULL);