serial/uart/h4: add ioctl interface
Signed-off-by: chengkai <chengkai@xiaomi.com>
This commit is contained in:
parent
841d8f5b37
commit
d78ffeca71
@ -351,7 +351,15 @@ out:
|
||||
static int uart_bth4_ioctl(FAR struct file *filep, int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
return OK;
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct uart_bth4_s *dev = inode->i_private;
|
||||
|
||||
if (!dev->drv->ioctl)
|
||||
{
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
return dev->drv->ioctl(dev->drv, cmd, arg);
|
||||
}
|
||||
|
||||
static int uart_bth4_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
@ -79,6 +79,11 @@ struct bt_driver_s
|
||||
enum bt_buf_type_e type,
|
||||
FAR void *data, size_t len);
|
||||
|
||||
/* Lower-half logic may support platform-specific ioctl commands */
|
||||
|
||||
CODE int (*ioctl)(FAR struct bt_driver_s *btdev, int cmd,
|
||||
unsigned long arg);
|
||||
|
||||
/* Filled by register function, shouldn't be touched by bt_driver_s */
|
||||
|
||||
FAR void *priv;
|
||||
|
Loading…
Reference in New Issue
Block a user