app: remove USART printing
This commit is contained in:
parent
24cec3850d
commit
02f95f55ee
|
@ -31,7 +31,6 @@
|
||||||
/* own libraries */
|
/* own libraries */
|
||||||
#include "global.h" // board definitions
|
#include "global.h" // board definitions
|
||||||
#include "print.h" // printing utilities
|
#include "print.h" // printing utilities
|
||||||
#include "uart.h" // USART utilities
|
|
||||||
#include "usb_cdcacm.h" // USB CDC ACM utilities
|
#include "usb_cdcacm.h" // USB CDC ACM utilities
|
||||||
#include "terminal.h" // handle the terminal interface
|
#include "terminal.h" // handle the terminal interface
|
||||||
#include "menu.h" // menu utilities
|
#include "menu.h" // menu utilities
|
||||||
|
@ -281,12 +280,10 @@ size_t putc(char c)
|
||||||
static char last_c = 0; // to remember on which character we last sent
|
static char last_c = 0; // to remember on which character we last sent
|
||||||
if ('\n' == c) { // send carriage return (CR) + line feed (LF) newline for each LF
|
if ('\n' == c) { // send carriage return (CR) + line feed (LF) newline for each LF
|
||||||
if ('\r' != last_c) { // CR has not already been sent
|
if ('\r' != last_c) { // CR has not already been sent
|
||||||
uart_putchar_nonblocking('\r'); // send CR over USART
|
|
||||||
usb_cdcacm_putchar('\r'); // send CR over USB
|
usb_cdcacm_putchar('\r'); // send CR over USB
|
||||||
length++; // remember we printed 1 character
|
length++; // remember we printed 1 character
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uart_putchar_nonblocking(c); // send byte over USART
|
|
||||||
usb_cdcacm_putchar(c); // send byte over USB
|
usb_cdcacm_putchar(c); // send byte over USB
|
||||||
length++; // remember we printed 1 character
|
length++; // remember we printed 1 character
|
||||||
last_c = c; // remember last character
|
last_c = c; // remember last character
|
||||||
|
@ -812,7 +809,6 @@ void main(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_setup(); // setup board
|
board_setup(); // setup board
|
||||||
uart_setup(); // setup USART (for printing)
|
|
||||||
usb_cdcacm_setup(); // setup USB CDC ACM (for printing)
|
usb_cdcacm_setup(); // setup USB CDC ACM (for printing)
|
||||||
OTG_FS_GCCFG |= OTG_GCCFG_NOVBUSSENS | OTG_GCCFG_PWRDWN; // disable VBUS sensing
|
OTG_FS_GCCFG |= OTG_GCCFG_NOVBUSSENS | OTG_GCCFG_PWRDWN; // disable VBUS sensing
|
||||||
OTG_FS_GCCFG &= ~(OTG_GCCFG_VBUSBSEN | OTG_GCCFG_VBUSASEN); // force USB device mode
|
OTG_FS_GCCFG &= ~(OTG_GCCFG_VBUSBSEN | OTG_GCCFG_VBUSASEN); // force USB device mode
|
||||||
|
|
Loading…
Reference in New Issue