123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #ifndef XPRINTF_H
- #define XPRINTF_H
- #include <inttypes.h>
- #include <avr/pgmspace.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern void (*xfunc_out)(uint8_t);
- #define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)
- void xputc(char chr);
- void xputs(const char *string_p);
- void xitoa(long value, char radix, char width);
- #define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__)
- #define xsprintf(str, format, ...) __xsprintf(str, PSTR(format), ##__VA_ARGS__)
- #define xfprintf(func, format, ...) __xfprintf(func, PSTR(format), ##__VA_ARGS__)
- void __xprintf(const char *format_p, ...);
- void __xsprintf(char*, const char *format_p, ...);
- void __xfprintf(void(*func)(uint8_t), const char *format_p, ...);
- char xatoi(char **str, long *ret);
- #ifdef __cplusplus
- }
- #endif
- #endif
|