当前位置: 技术问答>linux和unix
usb转serialport(232/422/485),有芯片源代码,不知从那个函数入手
来源: 互联网 发布时间:2016-11-17
本文导语: 原理上只要pc找的对应设备后,修改其寄存器的值即可对应修改serialport模式,问题在于从芯片原厂代码中哪个函数进行修改? 简要代码如下: static struct usb_serial_driver vizzini_device = { .driver = { ...
原理上只要pc找的对应设备后,修改其寄存器的值即可对应修改serialport模式,问题在于从芯片原厂代码中哪个函数进行修改?
简要代码如下:
static struct usb_serial_driver vizzini_device = {
.driver = {
.owner = THIS_MODULE,
.name = "usb2ser",
},
.description = "serial port",
.id_table = id_table,
.calc_num_ports = vizzini_calc_num_ports,
.probe = vizzini_probe,
.open = vizzini_open,
.close = vizzini_close,
.write = vizzini_write,
.write_room = vizzini_write_room,
.ioctl = vizzini_ioctl,
.set_termios = vizzini_set_termios,
.break_ctl = vizzini_break_ctl,
.tiocmget = vizzini_tiocmget,
.tiocmset = vizzini_tiocmset,
.attach = vizzini_attach,
#if LINUX_VERSION_CODE
简要代码如下:
static struct usb_serial_driver vizzini_device = {
.driver = {
.owner = THIS_MODULE,
.name = "usb2ser",
},
.description = "serial port",
.id_table = id_table,
.calc_num_ports = vizzini_calc_num_ports,
.probe = vizzini_probe,
.open = vizzini_open,
.close = vizzini_close,
.write = vizzini_write,
.write_room = vizzini_write_room,
.ioctl = vizzini_ioctl,
.set_termios = vizzini_set_termios,
.break_ctl = vizzini_break_ctl,
.tiocmget = vizzini_tiocmget,
.tiocmset = vizzini_tiocmset,
.attach = vizzini_attach,
#if LINUX_VERSION_CODE