improved TU_LOGs
This commit is contained in:
@@ -192,6 +192,11 @@ typedef enum {
|
|||||||
CDC_LINE_CODING_STOP_BITS_2 = 2, // 2 bits
|
CDC_LINE_CODING_STOP_BITS_2 = 2, // 2 bits
|
||||||
} cdc_line_coding_stopbits_t;
|
} cdc_line_coding_stopbits_t;
|
||||||
|
|
||||||
|
#define CDC_LINE_CODING_STOP_BITS_TEXT(STOP_BITS) ( \
|
||||||
|
STOP_BITS == CDC_LINE_CODING_STOP_BITS_1 ? "1" : \
|
||||||
|
STOP_BITS == CDC_LINE_CODING_STOP_BITS_1_5 ? "1.5" : \
|
||||||
|
STOP_BITS == CDC_LINE_CODING_STOP_BITS_2 ? "2" : "?" )
|
||||||
|
|
||||||
// TODO Backward compatible for typos. Maybe removed in the future release
|
// TODO Backward compatible for typos. Maybe removed in the future release
|
||||||
#define CDC_LINE_CONDING_STOP_BITS_1 CDC_LINE_CODING_STOP_BITS_1
|
#define CDC_LINE_CONDING_STOP_BITS_1 CDC_LINE_CODING_STOP_BITS_1
|
||||||
#define CDC_LINE_CONDING_STOP_BITS_1_5 CDC_LINE_CODING_STOP_BITS_1_5
|
#define CDC_LINE_CONDING_STOP_BITS_1_5 CDC_LINE_CODING_STOP_BITS_1_5
|
||||||
@@ -205,6 +210,13 @@ typedef enum {
|
|||||||
CDC_LINE_CODING_PARITY_SPACE = 4,
|
CDC_LINE_CODING_PARITY_SPACE = 4,
|
||||||
} cdc_line_coding_parity_t;
|
} cdc_line_coding_parity_t;
|
||||||
|
|
||||||
|
#define CDC_LINE_CODING_PARITY_CHAR(PARITY) ( \
|
||||||
|
PARITY == CDC_LINE_CODING_PARITY_NONE ? 'N' : \
|
||||||
|
PARITY == CDC_LINE_CODING_PARITY_ODD ? 'O' : \
|
||||||
|
PARITY == CDC_LINE_CODING_PARITY_EVEN ? 'E' : \
|
||||||
|
PARITY == CDC_LINE_CODING_PARITY_MARK ? 'M' : \
|
||||||
|
PARITY == CDC_LINE_CODING_PARITY_SPACE ? 'S' : '?' )
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// Management Element Notification (Notification Endpoint)
|
// Management Element Notification (Notification Endpoint)
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
DADDR, ITF_NUM, NAME, ##__VA_ARGS__)
|
DADDR, ITF_NUM, NAME, ##__VA_ARGS__)
|
||||||
#define TU_LOG_P_CDC(TXT,...) TU_LOG_CDC(TXT, p_cdc->daddr, p_cdc->bInterfaceNumber, \
|
#define TU_LOG_P_CDC(TXT,...) TU_LOG_CDC(TXT, p_cdc->daddr, p_cdc->bInterfaceNumber, \
|
||||||
serial_drivers[p_cdc->serial_drid].name, ##__VA_ARGS__)
|
serial_drivers[p_cdc->serial_drid].name, ##__VA_ARGS__)
|
||||||
#define TU_LOG_RESULT(TXT,RESULT) TU_LOG_P_CDC(TXT " " #RESULT " = %s", RESULT ? "true" : "FALSE" )
|
#define TU_LOG_P_CDC_BOOL(TXT,VAL) TU_LOG_P_CDC(TXT " " #VAL " = %s", VAL ? "true" : "false" )
|
||||||
|
|
||||||
#define TU_ASSERT_COMPLETE_DEFINE(_cond, _itf_offset) \
|
#define TU_ASSERT_COMPLETE_DEFINE(_cond, _itf_offset) \
|
||||||
do { \
|
do { \
|
||||||
@@ -395,14 +395,20 @@ bool tuh_cdc_get_dtr(uint8_t idx) {
|
|||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_VERIFY(p_cdc);
|
TU_VERIFY(p_cdc);
|
||||||
|
|
||||||
return (p_cdc->line_state & CDC_CONTROL_LINE_STATE_DTR) ? true : false;
|
bool ret = (p_cdc->line_state & CDC_CONTROL_LINE_STATE_DTR);
|
||||||
|
// TU_LOG_P_CDC_BOOL("get DTR", ret);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tuh_cdc_get_rts(uint8_t idx) {
|
bool tuh_cdc_get_rts(uint8_t idx) {
|
||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_VERIFY(p_cdc);
|
TU_VERIFY(p_cdc);
|
||||||
|
|
||||||
return (p_cdc->line_state & CDC_CONTROL_LINE_STATE_RTS) ? true : false;
|
bool ret = (p_cdc->line_state & CDC_CONTROL_LINE_STATE_RTS);
|
||||||
|
// TU_LOG_P_CDC_BOOL("get RTS", ret);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tuh_cdc_get_local_line_coding(uint8_t idx, cdc_line_coding_t * line_coding) {
|
bool tuh_cdc_get_local_line_coding(uint8_t idx, cdc_line_coding_t * line_coding) {
|
||||||
@@ -410,6 +416,10 @@ bool tuh_cdc_get_local_line_coding(uint8_t idx, cdc_line_coding_t * line_coding)
|
|||||||
TU_VERIFY(p_cdc);
|
TU_VERIFY(p_cdc);
|
||||||
|
|
||||||
*line_coding = p_cdc->line_coding;
|
*line_coding = p_cdc->line_coding;
|
||||||
|
TU_LOG_P_CDC("get line coding %lu %u%c%s",
|
||||||
|
p_cdc->line_coding.bit_rate, p_cdc->line_coding.data_bits,
|
||||||
|
CDC_LINE_CODING_PARITY_CHAR(p_cdc->line_coding.parity),
|
||||||
|
CDC_LINE_CODING_STOP_BITS_TEXT(line_coding->stop_bits));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -590,7 +600,7 @@ bool tuh_cdc_set_control_line_state(uint8_t idx, uint16_t line_state, tuh_xfer_c
|
|||||||
if (ret && !complete_cb) {
|
if (ret && !complete_cb) {
|
||||||
p_cdc->line_state = (uint8_t) line_state;
|
p_cdc->line_state = (uint8_t) line_state;
|
||||||
}
|
}
|
||||||
TU_LOG_RESULT("set control line state", ret);
|
// TU_LOG_P_CDC_BOOL("set control line state", ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -598,7 +608,7 @@ bool tuh_cdc_set_control_line_state(uint8_t idx, uint16_t line_state, tuh_xfer_c
|
|||||||
bool tuh_cdc_set_baudrate(uint8_t idx, uint32_t baudrate, tuh_xfer_cb_t complete_cb, uintptr_t user_data) {
|
bool tuh_cdc_set_baudrate(uint8_t idx, uint32_t baudrate, tuh_xfer_cb_t complete_cb, uintptr_t user_data) {
|
||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_VERIFY(p_cdc && p_cdc->serial_drid < SERIAL_DRIVER_COUNT);
|
TU_VERIFY(p_cdc && p_cdc->serial_drid < SERIAL_DRIVER_COUNT);
|
||||||
TU_LOG_P_CDC("set baudrate = %lu", baudrate);
|
TU_LOG_P_CDC("set baudrate %lu", baudrate);
|
||||||
cdch_serial_driver_t const * driver = &serial_drivers[p_cdc->serial_drid];
|
cdch_serial_driver_t const * driver = &serial_drivers[p_cdc->serial_drid];
|
||||||
|
|
||||||
p_cdc->requested_line_coding.bit_rate = baudrate;
|
p_cdc->requested_line_coding.bit_rate = baudrate;
|
||||||
@@ -608,7 +618,7 @@ bool tuh_cdc_set_baudrate(uint8_t idx, uint32_t baudrate, tuh_xfer_cb_t complete
|
|||||||
if (ret && !complete_cb) {
|
if (ret && !complete_cb) {
|
||||||
p_cdc->line_coding.bit_rate = baudrate;
|
p_cdc->line_coding.bit_rate = baudrate;
|
||||||
}
|
}
|
||||||
TU_LOG_RESULT("set baudrate", ret);
|
// TU_LOG_P_CDC_BOOL("set baudrate", ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -617,8 +627,9 @@ bool tuh_cdc_set_data_format(uint8_t idx, uint8_t stop_bits, uint8_t parity, uin
|
|||||||
tuh_xfer_cb_t complete_cb, uintptr_t user_data) {
|
tuh_xfer_cb_t complete_cb, uintptr_t user_data) {
|
||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_VERIFY(p_cdc && p_cdc->serial_drid < SERIAL_DRIVER_COUNT);
|
TU_VERIFY(p_cdc && p_cdc->serial_drid < SERIAL_DRIVER_COUNT);
|
||||||
TU_LOG_P_CDC("set data format data_bits = %u parity = %u stop_bits = %u (indexes!)",
|
TU_LOG_P_CDC("set data format %u%c%s",
|
||||||
data_bits, parity, stop_bits);
|
data_bits, CDC_LINE_CODING_PARITY_CHAR(parity),
|
||||||
|
CDC_LINE_CODING_STOP_BITS_TEXT(stop_bits));
|
||||||
cdch_serial_driver_t const * driver = &serial_drivers[p_cdc->serial_drid];
|
cdch_serial_driver_t const * driver = &serial_drivers[p_cdc->serial_drid];
|
||||||
|
|
||||||
p_cdc->requested_line_coding.stop_bits = stop_bits;
|
p_cdc->requested_line_coding.stop_bits = stop_bits;
|
||||||
@@ -632,7 +643,7 @@ bool tuh_cdc_set_data_format(uint8_t idx, uint8_t stop_bits, uint8_t parity, uin
|
|||||||
p_cdc->line_coding.parity = parity;
|
p_cdc->line_coding.parity = parity;
|
||||||
p_cdc->line_coding.data_bits = data_bits;
|
p_cdc->line_coding.data_bits = data_bits;
|
||||||
}
|
}
|
||||||
TU_LOG_RESULT("set data format", ret);
|
// TU_LOG_P_CDC_BOOL("set data format", ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -641,8 +652,10 @@ bool tuh_cdc_set_line_coding(uint8_t idx, cdc_line_coding_t const * line_coding,
|
|||||||
tuh_xfer_cb_t complete_cb, uintptr_t user_data) {
|
tuh_xfer_cb_t complete_cb, uintptr_t user_data) {
|
||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_VERIFY(p_cdc && p_cdc->serial_drid < SERIAL_DRIVER_COUNT);
|
TU_VERIFY(p_cdc && p_cdc->serial_drid < SERIAL_DRIVER_COUNT);
|
||||||
TU_LOG_P_CDC("set line coding baudrate = %lu data_bits = %u parity = %u stop_bits = %u (indexes!)",
|
TU_LOG_P_CDC("set line coding %lu %u%c%s",
|
||||||
line_coding->bit_rate, line_coding->data_bits, line_coding->parity, line_coding->stop_bits);
|
line_coding->bit_rate, line_coding->data_bits,
|
||||||
|
CDC_LINE_CODING_PARITY_CHAR(line_coding->parity),
|
||||||
|
CDC_LINE_CODING_STOP_BITS_TEXT(line_coding->stop_bits));
|
||||||
cdch_serial_driver_t const * driver = &serial_drivers[p_cdc->serial_drid];
|
cdch_serial_driver_t const * driver = &serial_drivers[p_cdc->serial_drid];
|
||||||
|
|
||||||
p_cdc->requested_line_coding = *line_coding;
|
p_cdc->requested_line_coding = *line_coding;
|
||||||
@@ -652,7 +665,7 @@ bool tuh_cdc_set_line_coding(uint8_t idx, cdc_line_coding_t const * line_coding,
|
|||||||
if (ret && !complete_cb) {
|
if (ret && !complete_cb) {
|
||||||
p_cdc->line_coding = *line_coding;
|
p_cdc->line_coding = *line_coding;
|
||||||
}
|
}
|
||||||
TU_LOG_RESULT("set line coding", ret);
|
// TU_LOG_P_CDC_BOOL("set line coding", ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -792,7 +805,7 @@ bool cdch_open(uint8_t rhport, uint8_t daddr, tusb_desc_interface_t const * itf_
|
|||||||
if (driver_detected) {
|
if (driver_detected) {
|
||||||
TU_LOG_CDC("open", daddr, itf_desc->bInterfaceNumber, driver_detected->name);
|
TU_LOG_CDC("open", daddr, itf_desc->bInterfaceNumber, driver_detected->name);
|
||||||
bool ret = driver_detected->open(daddr, itf_desc, max_len);
|
bool ret = driver_detected->open(daddr, itf_desc, max_len);
|
||||||
TU_LOG_CDC("opened ret = %s", daddr, itf_desc->bInterfaceNumber, driver_detected->name, ret ? "true" : "FALSE" );
|
// TU_LOG_CDC("opened ret = %s", daddr, itf_desc->bInterfaceNumber, driver_detected->name, ret ? "true" : "FALSE" );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,7 +815,7 @@ bool cdch_open(uint8_t rhport, uint8_t daddr, tusb_desc_interface_t const * itf_
|
|||||||
static void set_config_complete(uint8_t idx, uint8_t itf_offset, bool success) {
|
static void set_config_complete(uint8_t idx, uint8_t itf_offset, bool success) {
|
||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_ASSERT(p_cdc,);
|
TU_ASSERT(p_cdc,);
|
||||||
TU_LOG_RESULT("set config complete", success);
|
TU_LOG_P_CDC_BOOL("set config complete", success);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
p_cdc->mounted = true;
|
p_cdc->mounted = true;
|
||||||
@@ -854,7 +867,7 @@ static void acm_internal_control_complete(tuh_xfer_t * xfer) {
|
|||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_ASSERT(p_cdc,);
|
TU_ASSERT(p_cdc,);
|
||||||
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
||||||
TU_LOG_RESULT(" control complete", success);
|
TU_LOG_P_CDC_BOOL("control complete", success);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
switch (xfer->setup->bRequest) {
|
switch (xfer->setup->bRequest) {
|
||||||
@@ -1138,7 +1151,7 @@ static void ftdi_internal_control_complete(tuh_xfer_t * xfer) {
|
|||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_ASSERT(p_cdc,);
|
TU_ASSERT(p_cdc,);
|
||||||
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
||||||
TU_LOG_RESULT(" control complete", success);
|
TU_LOG_P_CDC_BOOL("control complete", success);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
if (xfer->setup->bRequest == FTDI_SIO_SET_MODEM_CTRL_REQUEST &&
|
if (xfer->setup->bRequest == FTDI_SIO_SET_MODEM_CTRL_REQUEST &&
|
||||||
@@ -1414,7 +1427,7 @@ static bool ftdi_determine_type(cdch_interface_t * p_cdc)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
TU_LOG_P_CDC(" %s detected (bcdDevice = 0x%04x)",
|
TU_LOG_P_CDC("%s detected (bcdDevice = 0x%04x)",
|
||||||
ftdi_chip_name[p_cdc->ftdi.chip_type], desc_dev->bcdDevice);
|
ftdi_chip_name[p_cdc->ftdi.chip_type], desc_dev->bcdDevice);
|
||||||
|
|
||||||
return (p_cdc->ftdi.chip_type != UNKNOWN);
|
return (p_cdc->ftdi.chip_type != UNKNOWN);
|
||||||
@@ -1562,7 +1575,7 @@ static inline uint32_t ftdi_get_divisor(cdch_interface_t * p_cdc)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
TU_LOG_P_CDC(" Baudrate divisor 0x%lu", div_value);
|
TU_LOG_P_CDC("Baudrate divisor = 0x%lu", div_value);
|
||||||
|
|
||||||
return div_value;
|
return div_value;
|
||||||
}
|
}
|
||||||
@@ -1671,7 +1684,7 @@ static void cp210x_internal_control_complete(tuh_xfer_t * xfer) {
|
|||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_ASSERT(p_cdc,);
|
TU_ASSERT(p_cdc,);
|
||||||
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
||||||
TU_LOG_RESULT(" control complete", success);
|
TU_LOG_P_CDC_BOOL("control complete", success);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
switch(xfer->setup->bRequest) {
|
switch(xfer->setup->bRequest) {
|
||||||
@@ -1928,7 +1941,7 @@ static void ch34x_internal_control_complete(tuh_xfer_t * xfer) {
|
|||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_ASSERT(p_cdc,);
|
TU_ASSERT(p_cdc,);
|
||||||
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
||||||
TU_LOG_RESULT(" control complete", success);
|
TU_LOG_P_CDC_BOOL("control complete", success);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
switch (xfer->setup->bRequest) {
|
switch (xfer->setup->bRequest) {
|
||||||
@@ -2059,7 +2072,7 @@ static void ch34x_process_config(tuh_xfer_t* xfer) {
|
|||||||
case CONFIG_CH34X_SERIAL_INIT: {
|
case CONFIG_CH34X_SERIAL_INIT: {
|
||||||
// handle version read data, set CH34x line coding (incl. baudrate)
|
// handle version read data, set CH34x line coding (incl. baudrate)
|
||||||
uint8_t const version = xfer->buffer[0];
|
uint8_t const version = xfer->buffer[0];
|
||||||
TU_LOG_P_CDC(" Chip Version = %02x", version);
|
TU_LOG_P_CDC("Chip Version = 0x%02x", version);
|
||||||
// only versions >= 0x30 are tested, below 0x30 seems having other programming
|
// only versions >= 0x30 are tested, below 0x30 seems having other programming
|
||||||
// see drivers from WCH vendor, Linux kernel and FreeBSD
|
// see drivers from WCH vendor, Linux kernel and FreeBSD
|
||||||
TU_ASSERT_COMPLETE(version >= 0x30);
|
TU_ASSERT_COMPLETE(version >= 0x30);
|
||||||
@@ -2346,7 +2359,7 @@ static void pl2303_internal_control_complete(tuh_xfer_t * xfer) {
|
|||||||
cdch_interface_t * p_cdc = get_itf(idx);
|
cdch_interface_t * p_cdc = get_itf(idx);
|
||||||
TU_ASSERT(p_cdc,);
|
TU_ASSERT(p_cdc,);
|
||||||
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
bool const success = (xfer->result == XFER_RESULT_SUCCESS);
|
||||||
TU_LOG_RESULT(" control complete", success);
|
TU_LOG_P_CDC_BOOL("control complete", success);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
if (xfer->setup->bRequest == PL2303_SET_LINE_REQUEST &&
|
if (xfer->setup->bRequest == PL2303_SET_LINE_REQUEST &&
|
||||||
@@ -2489,12 +2502,12 @@ static void pl2303_process_config(tuh_xfer_t * xfer) {
|
|||||||
p_cdc->pl2303.serial_private.type = &pl2303_type_data[type];
|
p_cdc->pl2303.serial_private.type = &pl2303_type_data[type];
|
||||||
p_cdc->pl2303.serial_private.quirks |= p_cdc->pl2303.serial_private.type->quirks;
|
p_cdc->pl2303.serial_private.quirks |= p_cdc->pl2303.serial_private.type->quirks;
|
||||||
#if CFG_TUSB_DEBUG >= CFG_TUH_CDC_LOG_LEVEL && 0 // can be activated if necessary
|
#if CFG_TUSB_DEBUG >= CFG_TUH_CDC_LOG_LEVEL && 0 // can be activated if necessary
|
||||||
TU_LOG_P_CDC(" bDeviceClass = 0x%02x bMaxPacketSize0 = %u bcdUSB = 0x%04x bcdDevice = 0x%04x",
|
TU_LOG_P_CDC("bDeviceClass = 0x%02x bMaxPacketSize0 = %u bcdUSB = 0x%04x bcdDevice = 0x%04x",
|
||||||
desc_dev->bDeviceClass, desc_dev->bMaxPacketSize0,
|
desc_dev->bDeviceClass, desc_dev->bMaxPacketSize0,
|
||||||
desc_dev->bcdUSB, desc_dev->bcdDevice );
|
desc_dev->bcdUSB, desc_dev->bcdDevice );
|
||||||
uint16_t vid, pid;
|
uint16_t vid, pid;
|
||||||
TU_ASSERT_COMPLETE(tuh_vid_pid_get(p_cdc->daddr, &vid, &pid));
|
TU_ASSERT_COMPLETE(tuh_vid_pid_get(p_cdc->daddr, &vid, &pid));
|
||||||
TU_LOG_P_CDC(" vid = 0x%04x pid = 0x%04x supports_hx_status = %u type = %s quirks = %u",
|
TU_LOG_P_CDC("vid = 0x%04x pid = 0x%04x supports_hx_status = %u type = %s quirks = %u",
|
||||||
vid, pid, p_cdc->pl2303.supports_hx_status,
|
vid, pid, p_cdc->pl2303.supports_hx_status,
|
||||||
p_cdc->pl2303.serial_private.type->name, p_cdc->pl2303.serial_private.quirks);
|
p_cdc->pl2303.serial_private.type->name, p_cdc->pl2303.serial_private.quirks);
|
||||||
#endif
|
#endif
|
||||||
@@ -2753,7 +2766,7 @@ static int8_t pl2303_detect_type(cdch_interface_t * p_cdc, uint8_t step,
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
TU_LOG_P_CDC(" unknown device type bcdUSB = 0x%04x", desc_dev->bcdUSB);
|
TU_LOG_P_CDC("unknown device type bcdUSB = 0x%04x", desc_dev->bcdUSB);
|
||||||
|
|
||||||
return PL2303_DETECT_TYPE_FAILED;
|
return PL2303_DETECT_TYPE_FAILED;
|
||||||
}
|
}
|
||||||
@@ -2903,7 +2916,7 @@ static bool pl2303_encode_baud_rate(cdch_interface_t * p_cdc, uint8_t buf[PL2303
|
|||||||
} else {
|
} else {
|
||||||
baud = pl2303_encode_baud_rate_divisor(buf, baud);
|
baud = pl2303_encode_baud_rate_divisor(buf, baud);
|
||||||
}
|
}
|
||||||
TU_LOG_P_CDC(" real baudrate = %lu", baud);
|
TU_LOG_P_CDC("real baudrate %lu", baud);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user