diff options
Diffstat (limited to '03-refactor/include')
-rw-r--r-- | 03-refactor/include/printf.h | 15 | ||||
-rw-r--r-- | 03-refactor/include/usart.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/03-refactor/include/printf.h b/03-refactor/include/printf.h new file mode 100644 index 0000000..ec3eec0 --- /dev/null +++ b/03-refactor/include/printf.h @@ -0,0 +1,15 @@ +#ifndef PRINTF_H_ +#define PRINTF_H_ + +#include <stdarg.h> +#include <stdlib.h> + +typedef void(*printf_callback_t)(volatile void*, char); + +void printf_format( + const char* fmt, + printf_callback_t callback, + volatile void* callback_closure, + va_list lst); + +#endif /* PRINTF_H_ */ diff --git a/03-refactor/include/usart.h b/03-refactor/include/usart.h index 3fea253..377048c 100644 --- a/03-refactor/include/usart.h +++ b/03-refactor/include/usart.h @@ -207,5 +207,7 @@ void usart_transmit_bytes( void usart_transmit_str(__IO usart_t* usart, const char* str); +void usart_printf(__IO usart_t* usart, const char* fmt, ...); + #endif /* H__USART_ */ |