/** * \file * * * * \brief Basic "printf", "sprintf" and "fprintf" formatter. * * $WIZ$ module_name = "formatwr" * $WIZ$ module_configuration = "bertos/cfg/cfg_formatwr.h" * $WIZ$ module_depends = "hex" * $WIZ$ module_harvard = "both" */ #ifndef MWARE_FORMATWR_H #define MWARE_FORMATWR_H #include "cfg/cfg_formatwr.h" #include /* CPU_HARVARD */ #include /* va_list */ /** * \name _formatted_write() configuration * $WIZ$ printf_list = "PRINTF_DISABLED", "PRINTF_NOMODIFIERS", "PRINTF_REDUCED", "PRINTF_NOFLOAT", "PRINTF_FULL" * \{ */ #define PRINTF_DISABLED 0 #define PRINTF_NOMODIFIERS 1 #define PRINTF_REDUCED 2 #define PRINTF_NOFLOAT 3 #define PRINTF_FULL 4 /* \} */ #ifndef CONFIG_PRINTF_RETURN_COUNT /** Enable/disable _formatted_write return value */ #define CONFIG_PRINTF_RETURN_COUNT 1 #endif int _formatted_write( const char *format, void put_char_func(char c, void *user_data), void *user_data, va_list ap); #if CPU_HARVARD #include int _formatted_write_P( const char * PROGMEM format, void put_char_func(char c, void *user_data), void *user_data, va_list ap); #endif /* CPU_HARVARD */ int sprintf_testSetup(void); int sprintf_testRun(void); int sprintf_testTearDown(void); #endif /* MWARE_FORMATWR_H */