mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/shell/commands/sc_interactive_sync: AVR puts to pgmspace
This commit is contained in:
parent
615fc2c3e6
commit
1241bee080
@ -20,11 +20,21 @@
|
||||
#include <stdio.h>
|
||||
#include "test_utils/interactive_sync.h"
|
||||
|
||||
#if defined(__AVR__)
|
||||
#include <avr/pgmspace.h>
|
||||
/* For small AVR targets the extra strings generated by test interactive
|
||||
can make the application overflow the .data section (RAM), we use puts_P()
|
||||
to write those constant string to .txt section (FLASH)*/
|
||||
#define PUTS(_s) puts_P(PSTR(_s))
|
||||
#else
|
||||
#define PUTS(_s) puts(_s)
|
||||
#endif
|
||||
|
||||
int _test_start(int argc, char **argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
puts("START");
|
||||
PUTS("START");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -34,6 +44,6 @@ int _test_ready(int argc, char **argv)
|
||||
{
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
puts("READY");
|
||||
PUTS("READY");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user