mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
STM32 Serial: PX4 HW workarround for flaky STM32 RTS. From David Sidrane
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* include/nuttx/serial/serial.h
|
||||
*
|
||||
* Copyright (C) 2007-2008, 2012-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2008, 2012-2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -53,7 +53,7 @@
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* Maximum number of threads than can be waiting for POLL events */
|
||||
@@ -62,6 +62,32 @@
|
||||
# define CONFIG_SERIAL_NPOLLWAITERS 2
|
||||
#endif
|
||||
|
||||
/* RX flow control */
|
||||
|
||||
#ifndef CONFIG_SERIAL_IFLOWCONTROL
|
||||
# undef CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS
|
||||
# undef CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK
|
||||
# undef CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS
|
||||
# ifndef CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK
|
||||
# define CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK 10
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK
|
||||
# define CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK 90
|
||||
# endif
|
||||
|
||||
# if CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK > \
|
||||
CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK
|
||||
# warning Lower watermark pct exceeds upper watermark pct
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* vtable access helpers */
|
||||
|
||||
#define uart_setup(dev) dev->ops->setup(dev)
|
||||
|
||||
Reference in New Issue
Block a user