public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RE: IO Streams
@ 2001-04-26  0:33 RAMPARANY Fano FTRD/DIH/GRE
  0 siblings, 0 replies; only message in thread
From: RAMPARANY Fano FTRD/DIH/GRE @ 2001-04-26  0:33 UTC (permalink / raw)
  To: 'Andy.Simpkins@TardisMobile.com', Ecos-Discuss (E-mail)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

Hi Andy,

I've developped a simple io stream module, with the
following API:

#define STREAMBUFSIZE 10000

typedef struct {
  unsigned char _buf[STREAMBUFSIZE];
  unsigned int _offset;
  unsigned int _top;
  short _init_p;
  cyg_sem_t _empty_semaphore;
  cyg_sem_t _full_semaphore;
  cyg_mutex_t _buf_mutex;
} streambufType;

void streambuf_init (streambufType *sb)
void streambuf_get (streambufType *sb, void *dest, int requested_size)
/* attempts to copy <size> items from <sb> into <dest> (waits if the sb is
empty) */
void streambuf_put (streambufType *sb, void *src, int requested_size)
/* attempts to copy <size> items from <src> into <sb> (waits if sb is full)
*/

If you're interested I can send you the file with
some examples on how to use it. Conversely, if such functionality
is available in eCos, I'll be happy to know. Up to now, I've been
suggested the message box facility, but it is mostly convenient for
accessing one item at a time.

Fano

-----Message d'origine-----
De : Andy Simpkins [ mailto:Andy.Simpkins@TardisMobile.com ]
Envoyé : lundi 23 avril 2001 18:45
À : Ecos-Discuss (E-mail)
Objet : IO Streams


Hi there,

Does anyone use libiostream with eCos?
If so what steps do I need to take to use it?

If not does eCos support IO streams and if so what do I need to use and what
files do I need to look at?

I don't fully understand the subject yet so please go gently with any reply!

Kind regards

Andy


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-04-26  0:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-26  0:33 [ECOS] RE: IO Streams RAMPARANY Fano FTRD/DIH/GRE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).