[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Re: LWIP_DEBUG in the ethernet_input function

From: Kieran Mansley
Subject: Re: [lwip-devel] Re: LWIP_DEBUG in the ethernet_input function
Date: Thu, 03 Sep 2009 12:45:21 +0100

On Fri, 2009-08-28 at 10:14 +0200, address@hidden wrote:
> Martin Velek wrote:
> > Hi,
> >
> > I am using usprintf from stellaris luminary package. It is a simple
> > replacement of sprintf with only %c, %d, %p, %s, %u, %x, and %X
> > formatting characters and support for zero filling & number of digits.
> >
> > So %2hx, %hhx gives me error because %h is unsupported. My cc.h definitions 
> > are:
> > #define U8_F "c"
> > #define S8_F "c"
> > #define X8_F "x"
> > #define U16_F "u"
> > #define S16_F "d"
> > #define X16_F "x"
> > #define U32_F "u"
> > #define S32_F "d"
> > #define X32_F "x"
> >
> > Question is why are not used macros in function ethernet_input but in
> > all other places are.
> That's because it has not been done yet. And the format (%2hx) is not 
> used anywhere else, I think. However, I don't think there's a problem 
> introducing a (predefined, overridable) define for this, only we had to 
> understand what whas going wrong to know how to design the format. In 
> this case, defining it to "hx" would be OK, I guess.

I'm not sure where %2hx came from: that wasn't one of my suggestions,
and doesn't make a lot of sense as a formatter.

At the moment the stack uses %02x, which is pretty common to support.
>From the description given above by Martin it sounds like it should work
for him, but apparently doesn't.  We need to understand why this doesn't
work before we can get a good fix to the problem.

I suggested %hhx as a possible alternative to %02x, but that's no use in
this case.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]