Skip to content

Commit

Permalink
os_print.h: Move PRINTF declaration in dedicated header
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Chapron authored and xchapron-ledger committed Jan 24, 2024
1 parent 3a12ddd commit d345ef6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions include/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,6 @@ os is not an application (it calls ux upon user inputs)
/* ----------------------------------------------------------------------- */
/* - DEBUG FUNCTIONS - */
/* ----------------------------------------------------------------------- */
#ifdef HAVE_PRINTF
void screen_printf(const char *format, ...);
void mcu_usb_printf(const char *format, ...);
#else // !HAVE_PRINTF
#define PRINTF(...)
#endif // !HAVE_PRINTF

// redefined if string.h not included
#ifdef HAVE_SPRINTF
#ifndef __APPLE__
Expand Down
7 changes: 7 additions & 0 deletions include/os_print.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@

// avoid typing the size each time
#define SPRINTF(strbuf, ...) snprintf(strbuf, sizeof(strbuf), __VA_ARGS__)

#ifdef HAVE_PRINTF
void screen_printf(const char *format, ...);
void mcu_usb_printf(const char *format, ...);
#else // !HAVE_PRINTF
#define PRINTF(...)
#endif // !HAVE_PRINTF

0 comments on commit d345ef6

Please sign in to comment.