X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fkdebug.c;h=7e5eaaa7befabfc2ccf11db90b4f7eccc752e392;hb=e6339d49f97766bd1825d6f07ec44ec864d5ebfe;hp=219aadffd43792717c73b97965d14abc8f532a18;hpb=0fbabc305e65dfc5538cfcae10c04f6be9daf657;p=bertos.git diff --git a/bertos/drv/kdebug.c b/bertos/drv/kdebug.c index 219aadff..7e5eaaa7 100644 --- a/bertos/drv/kdebug.c +++ b/bertos/drv/kdebug.c @@ -27,28 +27,26 @@ * the GNU General Public License. * * Copyright 2003, 2004, 2005, 2006, 2007 Develer S.r.l. (http://www.develer.com/) - * Copyright 2000, 2001, 2002 Bernardo Innocenti - * + * Copyright 2000, 2001, 2002 Bernie Innocenti * --> * * \brief General pourpose debug support for embedded systems (implementation). * * \version $Id$ - * \author Bernardo Innocenti + * \author Bernie Innocenti * \author Stefano Fedrigo */ -#include +#include "cfg/cfg_debug.h" #include /* for BV() */ #include #include -#include #include #include #include /* for _formatted_write() */ -#include +#include #ifdef _DEBUG @@ -58,9 +56,10 @@ #if OS_HOSTED - #include + #include // write() + #define KDBG_WAIT_READY() do { /*nop*/ } while(0) - #define KDBG_WRITE_CHAR(c) putc((c), stderr) + #define KDBG_WRITE_CHAR(c) do { char __c = (c); write(STDERR_FILENO, &__c, sizeof(__c)); } while(0) #define KDBG_MASK_IRQ(old) do { (void)(old); } while(0) #define KDBG_RESTORE_IRQ(old) do { /*nop*/ } while(0) typedef char kdbg_irqsave_t; /* unused */ @@ -190,7 +189,7 @@ static void klocation(const char * PGM_ATTR file, int line) PGM_FUNC(kputs)(PGM_STR(": ")); } -int PGM_FUNC(__assert)(const char * PGM_ATTR cond, const char * PGM_ATTR file, int line) +int PGM_FUNC(__bassert)(const char * PGM_ATTR cond, const char * PGM_ATTR file, int line) { klocation(file, line); PGM_FUNC(kputs)(PGM_STR("Assertion failed: "));