Convert uart2.c to a C++ file
This commit is contained in:
parent
6b01929382
commit
d3f95592c1
|
|
@ -268,7 +268,7 @@ set(FW_SOURCES
|
|||
tmc2130.cpp
|
||||
tone04.c
|
||||
twi.cpp
|
||||
uart2.c
|
||||
uart2.cpp
|
||||
ultralcd.cpp
|
||||
util.cpp
|
||||
xflash.c
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#define uart2_txready (UCSR2A & (1 << UDRE2))
|
||||
|
||||
uint8_t uart2_ibuf[20] = {0, 0};
|
||||
FILE _uart2io = {0};
|
||||
FILE _uart2io;
|
||||
|
||||
static int uart2_putchar(char c, _UNUSED FILE *stream)
|
||||
{
|
||||
|
|
@ -5,19 +5,9 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif //defined(__cplusplus)
|
||||
|
||||
|
||||
extern FILE _uart2io;
|
||||
#define uart2io (&_uart2io)
|
||||
|
||||
void uart2_init(uint32_t baudRate);
|
||||
|
||||
extern void uart2_init(uint32_t baudRate);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif //defined(__cplusplus)
|
||||
#endif //_UART2_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue