mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-17 02:07:48 -04:00
FreeRTOS Trace Fixes (#888)
* Updating the FreeRTOS/Demo/Posix_GCC Demo's Trace.dump file Creation * Updating the FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix Demo's Trace.dump file Creation Co-authored-by: Soren Ptak <skptak@amazon.com>
This commit is contained in:
parent
228f76cbe3
commit
1fc1e01fb6
23 changed files with 2696 additions and 2132 deletions
|
@ -25,8 +25,8 @@
|
|||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Example console I/O wrappers.
|
||||
*----------------------------------------------------------*/
|
||||
* Example console I/O wrappers.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
@ -37,21 +37,22 @@
|
|||
SemaphoreHandle_t xStdioMutex;
|
||||
StaticSemaphore_t xStdioMutexBuffer;
|
||||
|
||||
void console_init(void)
|
||||
void console_init( void )
|
||||
{
|
||||
xStdioMutex = xSemaphoreCreateMutexStatic(&xStdioMutexBuffer);
|
||||
xStdioMutex = xSemaphoreCreateMutexStatic( &xStdioMutexBuffer );
|
||||
}
|
||||
|
||||
void console_print(const char *fmt, ...)
|
||||
void console_print( const char * fmt,
|
||||
... )
|
||||
{
|
||||
va_list vargs;
|
||||
|
||||
va_start(vargs, fmt);
|
||||
va_start( vargs, fmt );
|
||||
|
||||
xSemaphoreTake(xStdioMutex, portMAX_DELAY);
|
||||
xSemaphoreTake( xStdioMutex, portMAX_DELAY );
|
||||
|
||||
vprintf(fmt, vargs);
|
||||
vprintf( fmt, vargs );
|
||||
|
||||
|
||||
va_end(vargs);
|
||||
va_end( vargs );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue