+ /*
+ * Determine which serial transport library to use. Derive the
+ * variant from the serial port's name. Default to libserialport
+ * for backwards compatibility.
+ */
+ if (ser_name_is_hid(serial))
+ serial->lib_funcs = ser_lib_funcs_hid;
+ else if (ser_name_is_bt(serial))
+ serial->lib_funcs = ser_lib_funcs_bt;
+ else
+ serial->lib_funcs = ser_lib_funcs_libsp;