Lines Matching refs:fd
74 int read_hci_event(int fd, unsigned char *buf, int size) in read_hci_event() argument
91 rd = read(fd, buf, 1); in read_hci_event()
107 rd = read(fd, buf + count, 3 - count); in read_hci_event()
120 rd = read(fd, buf + count, remain - (count - 3)); in read_hci_event()
135 static int read_command_complete(int fd, unsigned short opcode) in read_command_complete() argument
142 if (read_hci_event(fd, (unsigned char *)&resp, sizeof(resp)) < 0) { in read_command_complete()
274 int ldisc, len, fd, flow_ctrl; in st_uart_config() local
286 fd = open(DEV_NAME_SYSFS, O_RDONLY); in st_uart_config()
287 if (fd < 0) { in st_uart_config()
291 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
294 close(fd); in st_uart_config()
298 close(fd); in st_uart_config()
301 fd = open(BAUD_RATE_SYSFS, O_RDONLY); in st_uart_config()
302 if (fd < 0) { in st_uart_config()
306 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
309 close(fd); in st_uart_config()
312 close(fd); in st_uart_config()
316 fd = open(FLOW_CTRL_SYSFS, O_RDONLY); in st_uart_config()
317 if (fd < 0) { in st_uart_config()
319 close(fd); in st_uart_config()
322 len = read(fd, buf, UART_DEV_NAME_LEN); in st_uart_config()
325 close(fd); in st_uart_config()
328 close(fd); in st_uart_config()
514 p.fd = st_fd; in main()