2020-08-26 21:32:22 +03: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-30 02:18:30 +03:00
|
|
|
void fuprintf(FuriRecordSubscriber* f, const char* format, ...) {
|
2020-08-26 21:32:22 +03: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 13:34:23 +03:00
|
|
|
return furi_open("tty", false, false, NULL, NULL, NULL);
|
2020-08-26 21:32:22 +03:00
|
|
|
}
|