diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-08-10 19:14:08 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-08-10 19:14:08 +0200 |
commit | 4971ba4a97b304ae814b253707a789653f17b3c0 (patch) | |
tree | b413c3980af8a9b9a3ebcadf02bac5c7bf700807 /fw/fe310/eos/dev/eve.c | |
parent | ee54d05c5889b0f938b7198b659c7f493f66f941 (diff) |
fixed eve_select
Diffstat (limited to 'fw/fe310/eos/dev/eve.c')
-rw-r--r-- | fw/fe310/eos/dev/eve.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/fw/fe310/eos/dev/eve.c b/fw/fe310/eos/dev/eve.c index 0f98fed..b46e045 100644 --- a/fw/fe310/eos/dev/eve.c +++ b/fw/fe310/eos/dev/eve.c @@ -20,17 +20,17 @@ static void handle_time(unsigned char type) { if (!eos_eve_running()) return; - eve_spi_start(); + eve_select(); eve_handle_time(); - eve_spi_stop(); + eve_deselect(); } static void handle_evt(unsigned char type, unsigned char *buffer, uint16_t len) { if (!eos_eve_running()) return; - eve_spi_start(); + eve_select(); eve_handle_intr(); - eve_spi_stop(); + eve_deselect(); GPIO_REG(GPIO_LOW_IE) |= (1 << EVE_PIN_INTR); } @@ -65,7 +65,7 @@ int eos_eve_init(uint8_t wakeup_cause) { int rst = (wakeup_cause == EOS_PWR_WAKE_RST); int rv = EVE_OK; - eve_spi_start(); + eve_select(); if (rst) { rv = eve_init(); if (!rv) { @@ -75,7 +75,7 @@ int eos_eve_init(uint8_t wakeup_cause) { } else { eve_activate(); } - eve_spi_stop(); + eve_deselect(); if (rv) return EOS_ERR; @@ -93,7 +93,7 @@ void eos_eve_calibrate(void) { uint32_t matrix[6]; int r; - eve_spi_start(); + eve_select(); eve_brightness(0x40); eve_touch_set_extended(0); @@ -105,46 +105,46 @@ void eos_eve_calibrate(void) { do { r = eve_cmd_done(); if (r < 0) break; - eve_spi_stop(); + eve_deselect(); eos_evtq_exec(); - eve_spi_start(); + eve_select(); } while (!r); eve_touch_set_extended(1); eve_brightness(0); eve_touch_get_matrix(matrix); - eve_spi_stop(); + eve_deselect(); printf("TOUCH MATRIX:\n"); printf("uint32_t touch_matrix[6] = {0x%x,0x%x,0x%x,0x%x,0x%x,0x%x}\n", matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); } void eos_eve_set_touch_matrix(const uint32_t *matrix) { - eve_spi_start(); + eve_select(); eve_touch_set_matrix(matrix); - eve_spi_stop(); + eve_deselect(); } int eos_eve_run(uint8_t wakeup_cause) { - eve_spi_start(); + eve_select(); _start(); eve_start_clk(); - eve_spi_stop(); + eve_deselect(); return EOS_OK; } void eos_eve_start(void) { - eve_spi_start(); + eve_select(); _start(); - eve_spi_stop(); + eve_deselect(); } void eos_eve_stop(void) { - eve_spi_start(); + eve_select(); _stop(); - eve_spi_stop(); + eve_deselect(); } int eos_eve_running(void) { |