We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 719467e commit 6d79ee2Copy full SHA for 6d79ee2
1 file changed
examples/uart_main/uart_main.c
@@ -20,6 +20,10 @@
20
#include <stdio.h>
21
#include <uart/api.h>
22
23
+//Macros for generating function names
24
+#define CREATE_FAST_UART(uart_name,tx_pin) #uart_name#tx_pin"init()"
25
+#define SEND_FAST_UART(uart_name,tx_pin) uart_name##tx_pin##_tx
26
+
27
//Used for setting the baud rate.
28
//Currently unimplemented
29
enum uart_baud baud;
@@ -35,5 +39,5 @@ void main(void)
35
39
36
40
void putchar(char c)
37
41
{
38
- uartX_tx(c);
42
+ SEND_FAST_UART(uart,X)(c);
43
}
0 commit comments