Skip to content

Commit

Permalink
version 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaas, Wilfried authored and Klaas, Wilfried committed Aug 20, 2015
1 parent 095a399 commit 3bc4606
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 1 deletion.
45 changes: 45 additions & 0 deletions debug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
debug.h - Definition von 2 Debugfunktionen - Version 0.1
Copyright (c) 2012 Wilfried Klaas. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

// Program im Debugmodus kompilieren, dann werden zus. Ausgaben auf die serielle Schnittstelle geschrieben.
// Zum aktivieren der Debug Funktion bitte den Define VOR dem #include "debug.h" in die Hauptdatei eintragen.
//#define debug

#ifdef debug
#define dbgOut(S) \
Serial.print(S);
#define dbgOut2(S,P) \
Serial.print(S,P);
#define dbgOutLn(S) \
Serial.println(S);
#define dbgOutLn2(S,P) \
Serial.println(S,P);
#define initDebug() \
Serial.begin(57600); \
Serial.flush(); \
delay(100);
#else
#define dbgOut(S)
#define dbgOut2(S,P)
#define dbgOutLn(S)
#define dbgOutLn2(S,P)
#define initDebug()
#endif


6 changes: 6 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ handleInterrupt KEYWORD2
attachInt KEYWORD2
detachInt KEYWORD2
getMsValue KEYWORD2
between KEYWORD2
dbgOut KEYWORD2
dbgOutLn KEYWORD2
dbgOut2 KEYWORD2
dbgOutLn2 KEYWORD2
initDebug KEYWORD2

#######################################
# Constants (LITERAL1)
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MCStools
version=1.2.0
version=1.3.0
author=Wilfried Klaas
maintainer=Wilfried Klaas
sentence=A library to add support for rc receivers.
Expand Down
29 changes: 29 additions & 0 deletions makros.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
makros.cpp - Ein paar nützliche Makros - Version 0.1
Copyright (c) 2012 Wilfried Klaas. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef between
#define between(a,x,y) ((a >=x) && (a <= y))
#endif

#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif

0 comments on commit 3bc4606

Please sign in to comment.