Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/keyboard/hhkb/rn42/rn42.c b/keyboard/hhkb/rn42/rn42.c
- index 710169e..0af0daf 100644
- --- a/keyboard/hhkb/rn42/rn42.c
- +++ b/keyboard/hhkb/rn42/rn42.c
- @@ -235,3 +235,16 @@ static void config_send_keyboard(report_keyboard_t *report) {}
- static void config_send_mouse(report_mouse_t *report) {}
- static void config_send_system(uint16_t data) {}
- static void config_send_consumer(uint16_t data) {}
- +
- +void rn42_printf(const char * format, ...) {
- + int i;
- + char buf[256];
- + va_list args;
- + va_start(args, format);
- + vsprintf(buf, format, args);
- + va_end(args);
- + for (i=0; i<strlen(buf); i++) {
- + serial_send(buf[i]);
- + }
- +}
- +
- diff --git a/keyboard/hhkb/rn42/rn42.h b/keyboard/hhkb/rn42/rn42.h
- index db6916f..9ec0d0c 100644
- --- a/keyboard/hhkb/rn42/rn42.h
- +++ b/keyboard/hhkb/rn42/rn42.h
- @@ -19,5 +19,6 @@ void rn42_cts_hi(void);
- void rn42_cts_lo(void);
- bool rn42_linked(void);
- void rn42_set_leds(uint8_t l);
- +void rn42_printf(const char * format, ...);
- #endif
- diff --git a/keyboard/hhkb/rn42/rn42_task.c b/keyboard/hhkb/rn42/rn42_task.c
- index 5107fef..e465eaa 100644
- --- a/keyboard/hhkb/rn42/rn42_task.c
- +++ b/keyboard/hhkb/rn42/rn42_task.c
- @@ -364,6 +364,7 @@ bool command_extra(uint8_t code)
- xprintf("%02u:", t/3600);
- xprintf("%02u:", t%3600/60);
- xprintf("%02u\n", t%60);
- + rn42_printf("BAT: %umV\t", b);
- return true;
- case KC_U:
- if (config_mode) return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement