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

Help: ISR completed and Working, but one doubt...



Hi all,

First thank to all of you who helped me with getting my printer port driver working. It is working!!

According to rtems documentation and according to rtems mailling list messages, 
When one is writting device drivers he/she needs to pay attention to the following "rules", right?

1. Do not block inside an ISR.
2. keep ISR source code as small as possible, putting the "heavy" computation in the application.
3. Do not call other functions than the ones referred in the Rtems Interrupt Manager.


For now, my printer device driver just counts interrupt occurencies. 
I have testing it and I think it is working fine, but I am afreid of 
forgetting some important rule concerning ISR's, that my tests are not covering...

My question is:

Do you know any other important rules to take in account when working with IRS's?

   .Do we need to worry about turn on and turn of interrupts? We don't, right?
   .Do we need to take care of the context switching? We dont, right?


Some Extra Info:

Env: RTEMS 4.6.2, i686

I only implemented the xxx_initialize function of the device driver table, 
because I want to read and write directly to/from printer ports.

In xxx_initialize function I installed the irq handler using the BSP_install_irq_handler() function.

In the interrupt handler struct I only implemented the xxx_On(), where I initialize the printer 
ports in order to receive interrupts.

In the interrupt handler I inc. the counter of interrupts and then I signal the 8259 saying that
the interrupt was processed...

In the application source code, I do driver registering "on the fly" using the rtems_io_register_driver() 
function.


Thanks once again,

Alex









______________________________________________________________________
O IOL aumentou a caixa de correio para 100 MB!
Saiba mais - http://www.iol.pt/correio/rodape.php?dst=0501181