uracoli-devel
[Top][All Lists]
Advanced

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

Re: [uracoli-devel] Regarding the buffer_t structure


From: Joerg Wunsch
Subject: Re: [uracoli-devel] Regarding the buffer_t structure
Date: Thu, 17 Jun 2010 20:58:58 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

As rifo rifo wrote:

> In the xmpl_linbuf_rx.c file, we initialize the structure
> buffer_init() and then start getting data with buffer_get_char().

The caller of buffer_init() has to provide the space.

http://uracoli.nongnu.org/manual/usr/index.html

(Select Modules, then IO Utility Library, Buffer Management to
see the related documentation.)

In your example file, just have a look at how buf[] is defined:

#define XMPL_FRAME_SIZE (40)

...
uint8_t buf[sizeof(buffer_t) + XMPL_FRAME_SIZE];

So, it should be clear that 40 bytes are allocated for the actual
frame contents.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

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