Merge pull request 'provide a weak print char impl' (#674) from mueller/provide-weak-print-char into development

Reviewed-on: fsfw/fsfw#674
This commit is contained in:
Ulrich Mohr 2022-09-12 14:10:31 +02:00
commit 7e379d2159
2 changed files with 12 additions and 0 deletions

View File

@ -1 +1,3 @@
add_subdirectory(gpio) add_subdirectory(gpio)
target_sources(${LIB_FSFW_NAME} PRIVATE printChar.c)

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <stdbool.h>
void __attribute__((weak)) printChar(const char* character, bool errStream) {
if (errStream) {
fprintf(stderr, "%c", *character);
} else {
printf("%c", *character);
}
}