From 3f913efda03fd840cd526ef72e6f397c7da61bd7 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 9 Aug 2022 22:23:08 +0200 Subject: code layout --- fw/fe310/eos/eve/eve.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fw/fe310/eos/eve/eve.c') diff --git a/fw/fe310/eos/eve/eve.c b/fw/fe310/eos/eve/eve.c index 02e0cae..5103e5f 100644 --- a/fw/fe310/eos/eve/eve.c +++ b/fw/fe310/eos/eve/eve.c @@ -311,7 +311,7 @@ void eve_handle_intr(void) { if (intr_flags & (EVE_INT_CONVCOMPLETE | EVE_INT_TAG)) eve_handle_touch(intr_flags); } -int eve_init(uint8_t gpio_dir) { +int eve_init(void) { uint8_t chipid = 0; uint8_t reset = 0x07; uint16_t timeout; @@ -343,7 +343,7 @@ int eve_init(uint8_t gpio_dir) { eve_write8(REG_PWM_DUTY, 0x00); eve_write16(REG_GPIOX, 0x0000); - eve_write16(REG_GPIOX_DIR, 0x8000 | (gpio_dir & 0x0f)); + eve_write16(REG_GPIOX_DIR, 0x8000); /* initialize display */ eve_write16(REG_HCYCLE, EVE_HCYCLE); /* total number of clocks per line, incl front/back porch */ @@ -363,7 +363,8 @@ int eve_init(uint8_t gpio_dir) { /* do not set PCLK yet - wait for just after the first display list */ /* disable audio */ - eve_write16(REG_SOUND, 0x0000); /* set synthesizer to silence */ + eve_write16(REG_SOUND, 0x0060); /* set synthesizer to mute */ + eve_write8(REG_PLAY, 0x01); eve_write8(REG_VOL_SOUND, 0x00); /* turn synthesizer volume off */ eve_write8(REG_VOL_PB, 0x00); /* turn recorded audio volume off */ -- cgit v1.2.3