aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/util.h
blob: 8e3258f2cb2ab1c6206e1b5a89bde8a5ef724361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include <stdlib.h>
#include <stdio.h>
#include <stm32f0xx_hal.h>
#include <string.h>

#include "setup.h"

#define ws_usb_printf(fmt, ...) { \
	char temp[255]; \
	sprintf(temp, fmt, ##__VA_ARGS__); \
	HAL_UART_Transmit(&huart2, (uint8_t*) temp, sizeof(char) * strlen(temp), HAL_MAX_DELAY); \
}