USB Serial: note about all the redundant code.
This commit is contained in:
parent
e633222cd3
commit
62190caaa5
19
usb_serial.h
19
usb_serial.h
|
|
@ -10,6 +10,25 @@
|
||||||
#error Direct USB connection (USB_SERIAL) not yet supported on ARM.
|
#error Direct USB connection (USB_SERIAL) not yet supported on ARM.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
TODO: a whole lot of redundant code here. Probably this was taken from some
|
||||||
|
library and no improvements applied beyond the "works for me" status.
|
||||||
|
|
||||||
|
Some of the more obvious issues:
|
||||||
|
|
||||||
|
- All the serial parameters functions are pointless as such stuff is
|
||||||
|
configurable in Configtool, which means it's hardcoded at runtime.
|
||||||
|
|
||||||
|
- No need for usb_serial_putchar_nowait().
|
||||||
|
|
||||||
|
- No need for usb_serial_flush_input(), usb_serial_flush_output().
|
||||||
|
|
||||||
|
- usb_serial_write() isn't used, to either drop it or change other code
|
||||||
|
to use it.
|
||||||
|
|
||||||
|
- Macros ATOMIC_START, ATOMIC_END not used.
|
||||||
|
*/
|
||||||
|
|
||||||
// setup
|
// setup
|
||||||
void usb_init(void); // initialize everything
|
void usb_init(void); // initialize everything
|
||||||
uint8_t usb_configured(void); // is the USB port configured
|
uint8_t usb_configured(void); // is the USB port configured
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue