|
|
|
@ -64,8 +64,7 @@
@@ -64,8 +64,7 @@
|
|
|
|
|
|
|
|
|
|
#include <kinetis.h> |
|
|
|
|
#include <kinetis_uart.h> |
|
|
|
|
#include <hardware/kinetis_uart.h> |
|
|
|
|
#include <hardware/kinetis_sim.h> |
|
|
|
|
#include <kinetis_lpuart.h> |
|
|
|
|
#include "board_config.h" |
|
|
|
|
|
|
|
|
|
#include "arm_arch.h" |
|
|
|
@ -189,6 +188,26 @@ kinetis_boardinitialize(void)
@@ -189,6 +188,26 @@ kinetis_boardinitialize(void)
|
|
|
|
|
|
|
|
|
|
VDD_3V3_SPEKTRUM_POWER_EN(true); |
|
|
|
|
} |
|
|
|
|
/****************************************************************************
|
|
|
|
|
* Name: kinetis_serial_dma_poll_all |
|
|
|
|
* |
|
|
|
|
* Description: |
|
|
|
|
* Checks receive DMA buffers for received bytes that have not accumulated |
|
|
|
|
* to the point where the DMA half/full interrupt has triggered. |
|
|
|
|
* |
|
|
|
|
* This function should be called from a timer or other periodic context. |
|
|
|
|
* |
|
|
|
|
****************************************************************************/ |
|
|
|
|
|
|
|
|
|
void kinetis_lpserial_dma_poll_all(void) |
|
|
|
|
{ |
|
|
|
|
#if defined(LPSERIAL_HAVE_DMA) |
|
|
|
|
kinetis_lpserial_dma_poll(); |
|
|
|
|
#endif |
|
|
|
|
#if defined(SERIAL_HAVE_DMA) |
|
|
|
|
kinetis_serial_dma_poll(); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
|
* Name: board_app_initialize |
|
|
|
@ -236,7 +255,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
@@ -236,7 +255,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* set up the serial DMA polling */ |
|
|
|
|
#ifdef SERIAL_HAVE_DMA |
|
|
|
|
#if defined(SERIAL_HAVE_DMA) || defined(LPSERIAL_HAVE_DMA) |
|
|
|
|
static struct hrt_call serial_dma_call; |
|
|
|
|
struct timespec ts; |
|
|
|
|
|
|
|
|
@ -250,7 +269,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
@@ -250,7 +269,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
|
|
|
|
hrt_call_every(&serial_dma_call, |
|
|
|
|
ts_to_abstime(&ts), |
|
|
|
|
ts_to_abstime(&ts), |
|
|
|
|
(hrt_callout)kinetis_serial_dma_poll, |
|
|
|
|
(hrt_callout)kinetis_lpserial_dma_poll_all, |
|
|
|
|
NULL); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|