Skip to content

Commit

Permalink
Revert "nxp_fmuk66-v3:DMA Poll not needed"
Browse files Browse the repository at this point in the history
This reverts commit 962f022.
  • Loading branch information
davids5 committed Jul 20, 2021
1 parent 6c71fb7 commit 0b04239
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions boards/nxp/fmuk66-v3/src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0b04239

Please sign in to comment.