/* ------------------------------------------------------- my_printf.h Library-Header fuer eine eigene (sehr kleine) printf- Funktion. Compiler : riscv-none-elf-gcc fuer | myprintf | muss im Hauptprogramm irgendwo ein my_putchar vorhanden sein. Bsp.: void my_putchar(char ch) { txlcd_putchar(ch); } 25.03.2025 R. Seelig ------------------------------------------------------ */ #ifndef in_myprintf #define in_myprintf #include #include // #define uint8_t unsigned char // #define uint16_t unsigned int #define printf_enable 1 #define sprintf_enable 1 enum { MYSTREAM, MYARRAY }; extern char printfkomma; extern void my_putchar(char ch); void putint(int i, char komma); void hexnibbleout(uint8_t b); void puthex(uint16_t h, char out16); void putstring(char *p); #if (printf_enable == 1) void my_printf(const char *s,...); #endif #if (sprintf_enable == 1) void my_sprintf(char *buffer, const char *s,...); #endif #endif