Blinkinlabs / ch554_sdcc

CH554 software development kit for SDCC
295 stars 70 forks source link

conditionally compile USB CDC debug code #23

Closed nerdralph closed 3 years ago

nerdralph commented 3 years ago

When reviewing the the example, I noticed what looks like debug code. https://github.com/Blinkinlabs/ch554_sdcc/blob/master/examples/usb_device_cdc/main.c#L613

I tested with a ch552 using a loopback resistor between TXD1 and RXD1 (P1.7/P1.6), and received an extra 'H' character for every character I typed. Instead of removing the debug code, I changed it to compile only when DEBUG is defined.

nerdralph commented 3 years ago

Any comments?

nerdralph commented 3 years ago

Did you forget this?

cibomahto commented 3 years ago

Good catch!