2020-08-26 21:32:22 +03:00
|
|
|
#define _GNU_SOURCE
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "log.h"
|
2020-10-13 11:22:43 +03:00
|
|
|
#include "flipper.h"
|
2020-08-26 21:32:22 +03:00
|
|
|
|
|
|
|
#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-10-13 11:22:43 +03:00
|
|
|
return furi_open_deprecated("tty", false, false, NULL, NULL, NULL);
|
2020-08-26 21:32:22 +03:00
|
|
|
}
|