You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
432 B
C

#ifndef __PUTIL_H__
#define __PUTIL_H__
#include "stm32l4xx_hal.h"
int p_printf(const char *fmt, ...);
void p_uart_init(UART_HandleTypeDef *huart);
#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