Skip to content

Commit d3f9559

Browse files
gudnimg3d-gussner
authored andcommitted
Convert uart2.c to a C++ file
1 parent 6b01929 commit d3f9559

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ set(FW_SOURCES
268268
tmc2130.cpp
269269
tone04.c
270270
twi.cpp
271-
uart2.c
271+
uart2.cpp
272272
ultralcd.cpp
273273
util.cpp
274274
xflash.c

Firmware/uart2.c Firmware/uart2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define uart2_txready (UCSR2A & (1 << UDRE2))
1111

1212
uint8_t uart2_ibuf[20] = {0, 0};
13-
FILE _uart2io = {0};
13+
FILE _uart2io;
1414

1515
static int uart2_putchar(char c, _UNUSED FILE *stream)
1616
{

Firmware/uart2.h

+1-11
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,9 @@
55
#include <inttypes.h>
66
#include <stdio.h>
77

8-
9-
#if defined(__cplusplus)
10-
extern "C" {
11-
#endif //defined(__cplusplus)
12-
13-
148
extern FILE _uart2io;
159
#define uart2io (&_uart2io)
1610

11+
void uart2_init(uint32_t baudRate);
1712

18-
extern void uart2_init(uint32_t baudRate);
19-
20-
#if defined(__cplusplus)
21-
}
22-
#endif //defined(__cplusplus)
2313
#endif //_UART2_H

0 commit comments

Comments
 (0)