mirror of
https://github.com/apache/nuttx.git
synced 2026-09-22 06:04:28 +08:00
Merged in rnouse/nuttx (pull request #9)
Custom IOCTL support and more shadow warnings fixup
This commit is contained in:
@@ -318,6 +318,10 @@ config 16550_SUPRESS_CONFIG
|
||||
that configures the 16550_UART. In that case, you may want to
|
||||
just leave the existing console configuration in place. Default: n
|
||||
|
||||
config SERIAL_UART_ARCH_IOCTL
|
||||
bool "Platform has own custom IOCTL"
|
||||
default n
|
||||
|
||||
config 16550_REGINCR
|
||||
int "Address increment between 16550 registers"
|
||||
default 1
|
||||
|
||||
@@ -864,7 +864,15 @@ static int u16550_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
struct inode *inode = filep->f_inode;
|
||||
struct uart_dev_s *dev = inode->i_private;
|
||||
struct u16550_s *priv = (struct u16550_s*)dev->priv;
|
||||
int ret = OK;
|
||||
|
||||
#ifdef CONFIG_SERIAL_UART_ARCH_IOCTL
|
||||
int ret = uart_ioctl(filep, cmd, arg);
|
||||
|
||||
if (ret != -ENOTTY)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user