From 6b51c6390ae8679863b2378163eab60a8d58b5b4 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 13 Jul 2021 14:22:11 -0700 Subject: [PATCH] Revert "nxp_fmuk66-v3:DMA Poll not needed" This reverts commit 962f02220a851b78b3fab73038f03e06f3bb518f. --- boards/nxp/fmuk66-v3/src/init.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/boards/nxp/fmuk66-v3/src/init.c b/boards/nxp/fmuk66-v3/src/init.c index 09dc752985..d6cc60326b 100644 --- a/boards/nxp/fmuk66-v3/src/init.c +++ b/boards/nxp/fmuk66-v3/src/init.c @@ -235,6 +235,25 @@ __EXPORT int board_app_initialize(uintptr_t arg) syslog(LOG_ERR, "DMA alloc FAILED\n"); } + /* set up the serial DMA polling */ +#ifdef SERIAL_HAVE_DMA + static struct hrt_call serial_dma_call; + struct timespec ts; + + /* + * Poll at 1ms intervals for received bytes that have not triggered + * a DMA event. + */ + ts.tv_sec = 0; + ts.tv_nsec = 1000000; + + hrt_call_every(&serial_dma_call, + ts_to_abstime(&ts), + ts_to_abstime(&ts), + (hrt_callout)kinetis_serial_dma_poll, + NULL); +#endif + /* initial LED state */ drv_led_start(); led_off(LED_RED);