2020-08-26 18:32:22 +00:00
|
|
|
#define _GNU_SOURCE
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "log.h"
|
|
|
|
#include "furi.h"
|
|
|
|
|
|
|
|
#define PRINT_STR_SIZE 64
|
|
|
|
|
2020-09-29 23:18:30 +00:00
|
|
|
void fuprintf(FuriRecordSubscriber* f, const char* format, ...) {
|
2020-08-26 18:32:22 +00:00
|
|
|
char buffer[PRINT_STR_SIZE];
|
|
|
|
|
|
|
|
va_list args;
|
|
|
|
va_start(args, format);
|
|
|
|
vsprintf(buffer, format, args);
|
|
|
|
va_end(args);
|
|
|
|
|
|
|
|
furi_write(f, buffer, strlen(buffer));
|
|
|
|
}
|
|
|
|
|
|
|
|
FuriRecordSubscriber* get_default_log() {
|
2020-09-01 10:34:23 +00:00
|
|
|
return furi_open("tty", false, false, NULL, NULL, NULL);
|
2020-08-26 18:32:22 +00:00
|
|
|
}
|