1
0
Fork 0

[MERGE] Implement multiple logging backends (22159)

This commit is contained in:
Drashna Jael're 2024-02-16 10:41:44 -08:00
parent 1648a63812
commit cbb8b0de36
Signed by: drashna
GPG key ID: DBA1FD3A860D1B11
18 changed files with 111 additions and 35 deletions

View file

@ -0,0 +1,8 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include "sendchar.h"
int8_t console_write(uint8_t c);
int8_t sendchar(uint8_t c) {
return console_write(c);
}

View file

@ -0,0 +1,19 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#include "sendchar.h"
#include "uart.h"
#ifndef SENDCHAR_BAUD_RATE
# define SENDCHAR_BAUD_RATE 9600
#endif
int8_t sendchar(uint8_t c) {
static bool s_init = false;
if (!s_init) {
uart_init(SENDCHAR_BAUD_RATE);
s_init = true;
}
uart_write(c);
return 0;
}