diff options
Diffstat (limited to 'code')
-rw-r--r-- | code/fe310/eos/i2s.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/code/fe310/eos/i2s.c b/code/fe310/eos/i2s.c index 3cc0619..8c7096e 100644 --- a/code/fe310/eos/i2s.c +++ b/code/fe310/eos/i2s.c @@ -118,10 +118,7 @@ void eos_i2s_init(void) { } void eos_i2s_start(uint32_t sample_rate, unsigned char fmt) { - // Ignore the first run (for icache reasons) - uint32_t cpu_freq = PRCI_measure_mcycle_freq(3000, RTC_FREQ); - cpu_freq = PRCI_measure_mcycle_freq(3000, RTC_FREQ); - uint32_t ck_period = (cpu_freq / (sample_rate * 64)) & ~I2S_PWM_SCALE_CK_MASK;; + uint32_t ck_period = (PRCI_get_cpu_freq() / (sample_rate * 64)) & ~I2S_PWM_SCALE_CK_MASK;; GPIO_REG(GPIO_INPUT_EN) &= ~(1 << I2S_PIN_CK); GPIO_REG(GPIO_OUTPUT_EN) |= (1 << I2S_PIN_CK); |