FreeRTOS Emulator with SDL2 Based Graphics and Input Library
1.0
A POSIX wrapper to run FreeRTOS on an x86 machine with some basic input and output libraries aimed at making teaching FreeRTOS simpler.
|
A couple of drop in replacements for printf
and fprintf
to be used for thread safe printing when using FreeRTOS.
More...
#include <stdarg.h>
#include "FreeRTOS.h"
#include "queue.h"
#include "task.h"
#include "semphr.h"
#include "gfx_print.h"
#include "gfx_utils.h"
Classes | |
struct | error_print_msg |
Functions | |
void | fprints (FILE *__restrict __stream, const char *__format,...) |
Prints a formatted string to the specifed IO stream. More... | |
void | prints (const char *__format,...) |
Prints a formatted string to stdout More... | |
int | gfxSafePrintInit (void) |
Initializes the printing module. More... | |
void | gfxSafePrintExit (void) |
Exits the printing module. More... | |
Variables | |
char | rbuf_buffer [sizeof(struct error_print_msg) *SAFE_PRINT_INPUT_BUFFER_COUNT] = { 0 } |
rbuf_handle_t | input_rbuf = NULL |
xQueueHandle | safePrintQueue = NULL |
xTaskHandle | safePrintTaskHandle = NULL |
A couple of drop in replacements for printf
and fprintf
to be used for thread safe printing when using FreeRTOS.
---------------------------------------------------------------------- Copyright (C) Alexander Hoffman, 2020 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ----------------------------------------------------------------------
rbuf_handle_t input_rbuf = NULL |
char rbuf_buffer[sizeof(struct error_print_msg) * SAFE_PRINT_INPUT_BUFFER_COUNT] = { 0 } |
xQueueHandle safePrintQueue = NULL |
xTaskHandle safePrintTaskHandle = NULL |