This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: not able to find the serial_DSR and serial_init functions..
- To: Arif dot Abbas at combitechsystems dot com
- Subject: Re: [ECOS] not able to find the serial_DSR and serial_init functions..
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Wed, 04 Jul 2001 23:59:50 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <2253171AF143D21185A60000F8FA748B0379B1F8@pluto.combitech.se>
Arif.Abbas@combitechsystems.com wrote:
>
> Hi again everyone!
>
> I want to add a semaphore that get's incremented for each byte written to my
> serialport.
> I want this to be able to use the cyg_io_read(), which needs a certain
> length of data to
> read. And this is where the semaphore comes in the picture.
> The read process looks at the semaphore and does cyg_semaphore_trywait() and
> increments
> one local counter. Thus it gets the number of bytes to read.
You can get the number of bytes available to read with the
CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO key to cyg_io_get_config(). Or you can
set the driver to non-blocking mode which will always only return the
number of bytes available.
> To get a semaphore that is encremented for each byte written to the port, I
> declare
> a semaphore in the serialio.h file.
> But what I want to do next is to initialize the semaphore in the serial_init
> function and
> to increment it in a serial_DSR function.
>
> The problem is that I can't find the serial_init or the serial_DSR
> procedures...
> I am using a the templates for a nanoEngine, StrongArm CPU. I used the CVS
> to
> update the repository, and now I can't find the above mentioned functions
> for my board/CPU...
The generic level part of the serial driver system is at
io/serial/current/src/common/serial.c
The hardware specific portion is at devs/serial/arm/sa11x0/current/src/
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/