Only one fb-terminal-based putchar_()

This commit is contained in:
2025-11-02 14:16:10 +01:00
parent e52b33671b
commit 179c4b98e2
3 changed files with 4 additions and 20 deletions

View File

@ -28,12 +28,6 @@ CFLAGS += -I. \
-DPICO_SUPPORT_IPV4 \ -DPICO_SUPPORT_IPV4 \
-DPICO_SUPPORT_MUTEX \ -DPICO_SUPPORT_MUTEX \
ifeq ($(PUTCHAR_),fb)
CFLAGS += -DPUTCHAR_=PUTCHAR_FB
else
CFLAGS += -DPUTCHAR_=PUTCHAR_SERIAL
endif
include arch/$(ARCH)/$(ARCH).mk include arch/$(ARCH)/$(ARCH).mk
include extconf/extra.mk include extconf/extra.mk

View File

@ -1,7 +0,0 @@
#ifndef PUTCHAR_H_
#define PUTCHAR_H_
#define PUTCHAR_FB 1
#define PUTCHAR_SERIAL 2
#endif // PUTCHAR_H_

View File

@ -3,7 +3,6 @@
#include "spinlock/spinlock.h" #include "spinlock/spinlock.h"
#include "bootinfo/bootinfo.h" #include "bootinfo/bootinfo.h"
#include "term.h" #include "term.h"
#include "putchar.h"
#include "fm-t-437.f16.h" #include "fm-t-437.f16.h"
Term TERM; Term TERM;
@ -48,9 +47,7 @@ void term_write_unsafe(const char *s, size_t len) {
flanterm_write(TERM.ftctx, s, len); flanterm_write(TERM.ftctx, s, len);
} }
#if PUTCHAR_ == PUTCHAR_FB // For printf library
// For printf library void putchar_(char c) {
void putchar_(char c) { term_write_unsafe(&c, 1);
term_write_unsafe(&c, 1); }
}
#endif