Enable DMA based serial driver and add polling serial driver for more data.

This commit is contained in:
Jan Okle 2018-03-14 15:29:34 +01:00 committed by Daniel Agar
parent d2aa68f62c
commit 0754b3566c
3 changed files with 15 additions and 18 deletions

2
.gitmodules vendored
View File

@ -48,7 +48,7 @@
branch = master
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
url = https://github.com/PX4-NuttX/nuttx.git
url = https://github.com/leitwert/nuttx.git
branch = px4_firmware_nuttx-7.22+
[submodule "platforms/nuttx/NuttX/apps"]
path = platforms/nuttx/NuttX/apps

View File

@ -208,6 +208,7 @@ CONFIG_ARCH_FAMILY_K66=y
# Kinetis Peripheral Support
#
CONFIG_KINETIS_HAVE_FTM3=y
CONFIG_KINETIS_HAVE_DMA=y
CONFIG_KINETIS_HAVE_I2C1=y
CONFIG_KINETIS_HAVE_I2C2=y
CONFIG_KINETIS_HAVE_I2C3=y
@ -298,6 +299,11 @@ CONFIG_KINETIS_UART_EXTEDED_BREAK=y
CONFIG_KINETIS_SERIALBRK_BSDCOMPAT=y
# CONFIG_KINETIS_UART_SINGLEWIRE is not set
CONFIG_KINETIS_UARTFIFOS=y
CONFIG_UART0_RXDMA=y
CONFIG_UART1_RXDMA=y
CONFIG_UART2_RXDMA=y
CONFIG_UART4_RXDMA=y
CONFIG_KINETIS_SERIAL_RXDMA_BUFFER_SIZE=64
#
# Kinetis LPUART0 Configuration
@ -310,7 +316,6 @@ CONFIG_LPUART0_PARITY=0
CONFIG_LPUART0_2STOP=0
# CONFIG_LPUART0_IFLOWCONTROL is not set
# CONFIG_LPUART0_OFLOWCONTROL is not set
# CONFIG_LPUART0_DMA is not set
CONFIG_LPUART0_SERIAL_CONSOLE=y
# CONFIG_NO_LPUART_SERIAL_CONSOLE is not set
CONFIG_KINETIS_MERGE_TTY=y
@ -324,7 +329,7 @@ CONFIG_ARCH_TOOLCHAIN_GNU=y
#
# CONFIG_ARCH_NOINTC is not set
# CONFIG_ARCH_VECNOTIRQ is not set
# CONFIG_ARCH_DMA is not set
CONFIG_ARCH_DMA=y
CONFIG_ARCH_HAVE_IRQPRIO=y
# CONFIG_ARCH_L2CACHE is not set
# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set
@ -389,21 +394,10 @@ CONFIG_ARCH_BOARD="nxphlite-v3"
#
# Common Board Options
#
CONFIG_ARCH_HAVE_LEDS=y
# CONFIG_ARCH_LEDS is not set
#
# Board-Specific Options
#
CONFIG_NXPHLITE_SDHC_AUTOMOUNT=y
CONFIG_NXPHLITE_SDHC_AUTOMOUNT_FSTYPE="vfat"
CONFIG_NXPHLITE_SDHC_AUTOMOUNT_BLKDEV="/dev/mmcsd0"
CONFIG_NXPHLITE_SDHC_AUTOMOUNT_MOUNTPOINT="/fs/microsd"
CONFIG_NXPHLITE_SDHC_AUTOMOUNT_DDELAY=1000
CONFIG_NXPHLITE_SDHC_AUTOMOUNT_UDELAY=2000
CONFIG_BOARD_HAS_PROBES=y
CONFIG_BOARD_USE_PROBES=y
CONFIG_BOARD_CRASHDUMP=y
CONFIG_BOARD_RESET_ON_CRASH=y
CONFIG_LIB_BOARDCTL=y
@ -792,6 +786,7 @@ CONFIG_USBDEV_MAXPOWER=500
# CONFIG_PL2303 is not set
CONFIG_CDCACM=y
# CONFIG_CDCACM_CONSOLE is not set
# CONFIG_CDCACM_IFLOWCONTROL is not set
CONFIG_CDCACM_EP0MAXPACKET=64
CONFIG_CDCACM_EPINTIN=1
CONFIG_CDCACM_EPINTIN_FSSIZE=64
@ -812,6 +807,7 @@ CONFIG_CDCACM_PRODUCTID=0x0011
CONFIG_CDCACM_VENDORSTR="NXP"
CONFIG_CDCACM_PRODUCTSTR="PX4 NXPHlite v3.x"
# CONFIG_USBMSC is not set
# CONFIG_RNDIS is not set
# CONFIG_USBHOST is not set
# CONFIG_USBMISC is not set
# CONFIG_HAVE_USBTRACE is not set
@ -1079,6 +1075,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_CXXTEST is not set
# CONFIG_EXAMPLES_DHCPD is not set
# CONFIG_EXAMPLES_ELF is not set
# CONFIG_EXAMPLES_FLOWC is not set
# CONFIG_EXAMPLES_FSTEST is not set
# CONFIG_EXAMPLES_FTPC is not set
# CONFIG_EXAMPLES_FTPD is not set

View File

@ -62,6 +62,7 @@
#include <nuttx/analog/adc.h>
#include <kinetis.h>
#include <kinetis_uart.h>
#include <chip/kinetis_uart.h>
#include "board_config.h"
@ -262,10 +263,7 @@ int up_rtc_getdatetime(FAR struct tm *tp)
return 0;
}
static void kinetis_serial_dma_poll(void)
{
// todo:Stubbed
}
//FIXME: Stubs -----v
@ -337,6 +335,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
#endif
/* set up the serial DMA polling */
#ifdef SERIAL_HAVE_DMA
static struct hrt_call serial_dma_call;
struct timespec ts;
@ -352,6 +351,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
ts_to_abstime(&ts),
(hrt_callout)kinetis_serial_dma_poll,
NULL);
#endif
#if defined(CONFIG_KINETIS_BBSRAM)