diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-18 16:22:34 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-18 16:22:34 +0000 |
commit | 9057c6c72be213bb7f07929e2ddd1ab1e942a1de (patch) | |
tree | 2e61c984622621c39207b1d63198ca50a2e99f6c /os/various/chprintf.c | |
parent | 3626647d7b924ca07df4197f9cde4a7965b8cbdf (diff) | |
download | ChibiOS-9057c6c72be213bb7f07929e2ddd1ab1e942a1de.tar.gz ChibiOS-9057c6c72be213bb7f07929e2ddd1ab1e942a1de.tar.bz2 ChibiOS-9057c6c72be213bb7f07929e2ddd1ab1e942a1de.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4294 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various/chprintf.c')
-rw-r--r-- | os/various/chprintf.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/os/various/chprintf.c b/os/various/chprintf.c index 78a4a8ac1..2e03fe9c2 100644 --- a/os/various/chprintf.c +++ b/os/various/chprintf.c @@ -37,11 +37,6 @@ #define MAX_FILLER 11
#define FLOAT_PRECISION 100000
-static void _putc(BaseSequentialStream *chp, char c) {
-
- chSequentialStreamWrite(chp, (const uint8_t *)&c, 1);
-}
-
static char *long_to_string_with_divisor(char *p,
long num,
unsigned radix,
@@ -133,7 +128,7 @@ void chprintf(BaseSequentialStream *chp, const char *fmt, ...) { return;
}
if (c != '%') {
- _putc(chp, (uint8_t)c);
+ chSequentialStreamPut(chp, (uint8_t)c);
continue;
}
p = tmpbuf;
@@ -248,18 +243,18 @@ unsigned_common: width = -width;
if (width < 0) {
if (*s == '-' && filler == '0') {
- _putc(chp, (uint8_t)*s++);
+ chSequentialStreamPut(chp, (uint8_t)*s++);
i--;
}
do
- _putc(chp, (uint8_t)filler);
+ chSequentialStreamPut(chp, (uint8_t)filler);
while (++width != 0);
}
while (--i >= 0)
- _putc(chp, (uint8_t)*s++);
+ chSequentialStreamPut(chp, (uint8_t)*s++);
while (width) {
- _putc(chp, (uint8_t)filler);
+ chSequentialStreamPut(chp, (uint8_t)filler);
width--;
}
}
|