This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: polled serial
- To: <andrew dot lunn at ascom dot ch>
- Subject: RE: [ECOS] polled serial
- From: "Andy Simpkins" <Andy dot Simpkins at TardisMobile dot com>
- Date: Fri, 1 Jun 2001 14:59:42 +0100
- Cc: "eCos Disuss" <ecos-discuss at sourceware dot cygnus dot com>
- Reply-To: Andy dot Simpkins at TardisMobile dot com
Hi there Andrew
ummm, looks like I am using a greatly outdated version of eCOS,
cyg_serial_info_t is not found anywhere on my machine!
NT 4, cygwin, eCos 1.3.1
Custom Hardware, ARM7TDMI Core
Andy
> -----Original Message-----
> From: Andrew Lunn [mailto:andrew.lunn@ascom.ch]
> Sent: 01 June 2001 12:43
> To: Andy Simpkins
> Cc: eCos Disuss
> Subject: Re: [ECOS] polled serial
>
>
> On Fri, Jun 01, 2001 at 12:33:23PM +0100, Andy Simpkins wrote:
> > Hi there,
> >
> > Assuming that I have understood things properly, cyg_io_read is
> a blocking
> > function, i.e. once called it will only return when characters have been
> > received from the serial port. Is there another function available to
> > either return the amount of data currently held in the receive buffer
>
> Try this
>
>
> {
> cyg_serial_buf_info_t bufinfo;
> cyg_uint32 len;
>
> len = sizeof(bufinfo);
> cyg_io_get_config(port_handle, CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO,
> &bufinfo, &len);
>
> return bufinfo.rx_count;
> }
>
> Andrew
>