Skip to content

Commit

Permalink
Fix build issues when RTT is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
peterharperuk committed Oct 23, 2024
1 parent b9eeeb3 commit 7d2a27d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/rp2_common/pico_stdio_rtt/SEGGER/RTT/SEGGER_RTT.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ Additional information:

#include <string.h> // for memcpy

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wcast-qual"
#pragma GCC diagnostic ignored "-Wcast-align"
#endif

/*********************************************************************
*
* Configuration, default values
Expand Down
4 changes: 2 additions & 2 deletions src/rp2_common/pico_stdio_rtt/stdio_rtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ void stdio_rtt_deinit(void) {
}

static void stdio_rtt_out_chars(const char *buf, int length) {
SEGGER_RTT_Write(0, buf, length);
SEGGER_RTT_Write(0, buf, (unsigned)length);
}

static int stdio_rtt_in_chars(char *buf, int length) {
return SEGGER_RTT_Read(0, buf, length);
return (int)SEGGER_RTT_Read(0, buf, (unsigned)length);
}

stdio_driver_t stdio_rtt = {
Expand Down

0 comments on commit 7d2a27d

Please sign in to comment.