Skip to content

Commit

Permalink
Convert uart2.c to a C++ file
Browse files Browse the repository at this point in the history
  • Loading branch information
gudnimg authored and 3d-gussner committed Nov 27, 2024
1 parent 6b01929 commit d3f9559
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ set(FW_SOURCES
tmc2130.cpp
tone04.c
twi.cpp
uart2.c
uart2.cpp
ultralcd.cpp
util.cpp
xflash.c
Expand Down
2 changes: 1 addition & 1 deletion Firmware/uart2.c → Firmware/uart2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
12 changes: 1 addition & 11 deletions Firmware/uart2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d3f9559

Please sign in to comment.