Specifications
CAVR-4
250
AVR–specific library functions
AVR® IAR C/C++ Compiler
Reference Guide
SPECIFYING READ AND WRITE FORMATTERS
You can override default formatters for the functions printf_P and scanf_P by
editing the linker command file. Note that it is not possible to use the IAR Embedded
Workbench interface for overriding the default formatter for the AVR-specific library
routines.
To override the default
printf_P formatter, type any of the following lines in your
linker command file:
-e_small_write_P=_formatted_write_P
-e_medium_write_P=_formatted_write_P
To override the default scanf_P formatter, type the following line in your linker
command file:
-e_medium_read_P=_formatted_read_P
memcmp_G
int memcmp_G(const void *s1, const void __generic *s2, size_t n);
Identical to memcmp except that s2 can be located in flash or data memory. This function
is only available in the DLIB library.
memcpy_G void * memcpy_G(void *s1, const void __generic *s2, size_t n);
Identical to memcpy except that it copies string s2 in flash or data memory to string s2
in data memory. This function is only available in the DLIB library.
memcpy_P void * memcpy_P(void *s1, PGM_P s2, size_t n);
Identical to memcpy except that it copies string s2 in flash memory to string s2 in data
memory. This function is available in both the CLIB and the DLIB library.
printf_P int printf_P(PGM_P __format,…);
Similar to printf except that the format string is in flash memory, not in data memory.
This function is available in both the CLIB and the DLIB library. For information about
how to override default formatter, see Specifying read and write formatters, page 250.
puts_G int puts_G(const char __generic *s);
Identical to puts except that the string to be written can be in flash or data memory. This
function is only available in the DLIB library.