RTEMS device driver and interrupt

Joel Sherrill joel at OARcorp.com
Thu Apr 11 18:33:48 UTC 2002



Pattara Kiatisevi wrote:
> 
> Hi,
> 
> I have a conceptual problem while writing a device driver for sound.
> The idea is that the write() function to this device should block until
> all the music sent has been played. I plan to:
> 
> -have the audio core sent the interrupt when it finishes playing the music
> to processor.
> -in the device driver code:
>         -write() function blocks at rtems_semaphore_obtain(x) after
> sending all data to hardware
>         -an interrupt service routine will call rtems_semaphore_release(x)
> which will wake up the write() to finish
> 
> Is this scheme ok? Or RTEMS guys are usually doing something else..

It should be OK.  Some people also use event send/receive for 
interaction between ISRs and tasks.  The choice depends on what you
are controlling and what works more naturally.  

Out of curiousity, how much code, data, and bss is your application
taking?  I am curious how light/heavy your application is.

How much memory is required for effective buffering?  Where are your
sound source files stored?

So many questions.. ;)

> Thanks much,
> Pattara
> 
> --
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.fsf.org/philosophy/no-word-attachments.html
> ----------------------------------------------------------------------
> Ott Pattara Kiatisevi                              T L W G
> M.Sc. INFOTECH Student, Stuttgart, Germany      http://linux.thai.net/
> ----------------------------------------------------------------------

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list