mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
fflush(stdout) for keyboard host example
This commit is contained in:
parent
7828c396db
commit
865ebf7c5d
@ -143,6 +143,8 @@ static inline void process_kbd_report(hid_keyboard_report_t const *p_new_report)
|
||||
uint8_t ch = keycode2ascii[p_new_report->keycode[i]][is_shift ? 1 : 0];
|
||||
putchar(ch);
|
||||
if ( ch == '\r' ) putchar('\n'); // added new line for enter key
|
||||
|
||||
fflush(stdout); // flush right away, else nanolib will wait for newline
|
||||
}
|
||||
}
|
||||
// TODO example skips key released
|
||||
|
@ -35,7 +35,7 @@
|
||||
//------------- IMPLEMENTATION -------------//
|
||||
void tuh_msc_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
printf("a MassStorage device is mounted\r\n");
|
||||
printf("A MassStorage device is mounted\r\n");
|
||||
|
||||
//------------- Disk Information -------------//
|
||||
// SCSI VendorID[8] & ProductID[16] from Inquiry Command
|
||||
@ -83,7 +83,7 @@ void tuh_msc_mounted_cb(uint8_t dev_addr)
|
||||
void tuh_msc_unmounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
(void) dev_addr;
|
||||
printf("a MassStorage device is unmounted\r\n");
|
||||
printf("A MassStorage device is unmounted\r\n");
|
||||
|
||||
// uint8_t phy_disk = dev_addr-1;
|
||||
//
|
||||
|
@ -84,7 +84,6 @@ ifeq ($(LOGGER),rtt)
|
||||
RTT_SRC = lib/SEGGER_RTT
|
||||
CFLAGS += -DLOGGER_RTT -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
|
||||
INC += $(TOP)/$(RTT_SRC)/RTT
|
||||
SRC_C += $(RTT_SRC)/RTT/SEGGER_RTT_printf.c
|
||||
SRC_C += $(RTT_SRC)/RTT/SEGGER_RTT.c
|
||||
else ifeq ($(LOGGER),swo)
|
||||
CFLAGS += -DLOGGER_SWO
|
||||
|
Loading…
x
Reference in New Issue
Block a user