X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fkdebug.c;h=cb04f70b40bc3193a5398a1e3df6b80c8800d821;hb=262909fe371512dfae6f07158c242d17ee9ee636;hp=f75f18334f43384b5650dd8818692076606ffab7;hpb=c22fe24a0da896a52dbc3882390ec18a440ef56a;p=bertos.git diff --git a/bertos/drv/kdebug.c b/bertos/drv/kdebug.c index f75f1833..cb04f70b 100644 --- a/bertos/drv/kdebug.c +++ b/bertos/drv/kdebug.c @@ -27,14 +27,12 @@ * 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 */ @@ -43,12 +41,11 @@ #include #include -#include #include #include #include /* for _formatted_write() */ -#include +#include #ifdef _DEBUG @@ -58,9 +55,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 +188,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: "));