1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #include <avr/io.h>
- #include <avr/pgmspace.h>
- #include "print.h"
- #ifndef NO_PRINT
- #define sendchar(c) xputc(c)
- void print_set_sendchar(int8_t (*sendchar_func)(uint8_t))
- {
- xdev_out(sendchar_func);
- }
- void print_S(const char *s)
- {
- uint8_t c;
- while (1) {
- c = *s++;
- if (!c) break;
- if (c == '\n') sendchar('\r');
- sendchar(c);
- }
- }
- void print_lf(void)
- {
- sendchar('\n');
- }
- void print_crlf(void)
- {
- sendchar('\r');
- sendchar('\n');
- }
- #endif
|