From 5fb947cb04aa4d02d028b3463283a2e851691440 Mon Sep 17 00:00:00 2001 From: demik Date: Mon, 9 Aug 2021 23:46:57 +0200 Subject: [PATCH] code cleaning --- main/adb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main/adb.c b/main/adb.c index bc3536e..4f0b046 100644 --- a/main/adb.c +++ b/main/adb.c @@ -170,7 +170,7 @@ void adb_probe(void) { * Somewhat a hack, but resetting the module sometimes help. */ -void adb_rmt_reset() { +static void adb_rmt_reset() { periph_module_reset(PERIPH_RMT_MODULE); rmt_config(&adb_rmt_rx); xTaskNotify(t_red, LED_ONCE, eSetValueWithOverwrite); @@ -300,7 +300,7 @@ static uint16_t IRAM_ATTR adb_rx_mouse() { configASSERT(rb != NULL); rmt_rx_start(RMT_RX_CHANNEL, true); items = (rmt_item32_t*)xRingbufferReceive(rb, &rx_size, pdMS_TO_TICKS(8)); - rmt_status = RMT.status_ch[RMT_RX_CHANNEL]; + rmt_get_status(RMT_RX_CHANNEL, &rmt_status); if (((rmt_status >> RMT_STATE_CH0_S) & RMT_STATE_CH0_V) == 4) adb_rmt_reset(); rmt_rx_stop(RMT_RX_CHANNEL); @@ -321,7 +321,6 @@ static uint16_t IRAM_ATTR adb_rx_mouse() { /* RMT giving back a buffer with a rx_size of 0… */ case 4: /* single glitch or service request (keyboard), timeout/ignore */ - rmt_memory_rw_rst(RMT_RX_CHANNEL); vRingbufferReturnItem(rb, (void*) items); return 0; case 72: