Initial Commit:

- Create single library for all Core RedA functions/classes
- Working version
This commit is contained in:
Charl Wentzel
2016-05-17 07:38:33 +02:00
commit 264169e525
11 changed files with 1033 additions and 0 deletions

45
LogCore.cpp Normal file
View File

@@ -0,0 +1,45 @@
/*
* LogCore.cpp
*
* Created on: 17 May 2016
* Author: wentzelc
*/
// redA Libraries
#include "LogCore.h"
// Standard C/C++ Libraries
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
//---------------------------------------------------------------------------
void ShowOutput( const char * Name, const char * Buffer, const int Len, const long Duration )
{
// Show Duration delay
if (Duration) {
printf( "Delay: %ld", Duration );
}
// Show Hex output
if (ShowOutBytes) {
printf( "%s in (hex): ", Name );
for (int i=0; i<Len; i++) {
printf( "%02X ", Buffer[i] );
}
printf( "\n" );
}
// Show normal output
if (ShowOutHex) {
printf( "%s in [%d]: %s", Name, Len, Buffer );
if (Buffer[Len-1] != '\n') {
printf( "\n" );
}
}
}
//---------------------------------------------------------------------------