• Home
  • Raw
  • Download

Lines Matching refs:fd

62     int fd;                     /* fd to Bluetooth device */  member
137 void userial_ioctl_init_bt_wake(int fd) in userial_ioctl_init_bt_wake() argument
145 if (ioctl(vnd_userial.fd, TIOCSETD, &ldisc) < 0) in userial_ioctl_init_bt_wake()
148 fd, errno, ldisc); in userial_ioctl_init_bt_wake()
155 ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_ioctl_init_bt_wake()
156 ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, &bt_wake_state); in userial_ioctl_init_bt_wake()
178 vnd_userial.fd = -1; in userial_vendor_init()
199 vnd_userial.fd = -1; in userial_vendor_open()
244 if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) in userial_vendor_open()
250 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
252 tcgetattr(vnd_userial.fd, &vnd_userial.termios); in userial_vendor_open()
255 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
256 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
258 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
259 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
260 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
265 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
268 userial_ioctl_init_bt_wake(vnd_userial.fd); in userial_vendor_open()
271 ALOGI("device fd = %d open", vnd_userial.fd); in userial_vendor_open()
273 return vnd_userial.fd; in userial_vendor_open()
289 if (vnd_userial.fd == -1) in userial_vendor_close()
294 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL); in userial_vendor_close()
297 ALOGI("device fd = %d close", vnd_userial.fd); in userial_vendor_close()
299 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_close()
300 if ((result = close(vnd_userial.fd)) < 0) in userial_vendor_close()
301 ALOGE( "close(fd:%d) FAILED result:%d", vnd_userial.fd, result); in userial_vendor_close()
303 vnd_userial.fd = -1; in userial_vendor_close()
323 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_set_baud()
342 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_vendor_ioctl()
347 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL); in userial_vendor_ioctl()
351 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_GET_ST, p_data); in userial_vendor_ioctl()