#ifndef __PUTIL_H__ #define __PUTIL_H__ #include "stm32l4xx_hal.h" int p_printf(const char *fmt, ...); void p_uart_init(UART_HandleTypeDef *huart); void p_uart_async_write_byte(uint8_t byte); #define Stringize(L) #L #define MakeString(M, L) M(L) #define $Line MakeString(Stringize, __LINE__) #define Reminder __FILE__ "(" $Line ") : Reminder: " #ifdef _DEBUG #define PDEBUG(f_, ...) p_printf((f_), ##__VA_ARGS__) #else #define PDEBUG(f_, ...) void(f_, ...) #endif #endif