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

Interrupt questions



Hello,

Can I use the macro or function INIT_CMOS_CLOCK? In "The RTLinux Manifesto"
under the Interrupt handlers section (pg. 8), the document says the
following:

Instead of using the calls to the scheduler module - rtl_task_wait,
rtl_task_init, and rtl_task_make_periodic - we could simply attach our
function to a timer.  Using similar task code, we could change the
initializing code as follows.

int init_module(void)
{
   rtl_request_irq(CMOS_CLOCK, handler_ptr);
   INIT_CMOS_CLOCK(FIFTYMS);
   return 0;
} 

My questions are:
1. If I can implement this approach, then what header file (.h file)
contains the CMOS_CLOCK definition and the prototype or macro
   definition for INIT_CMOS_CLOCK? If there is no .h file containing these
references, then what is the interrupt number (irq) of this
   CMOS clock?

2. Will the irq for my serial communications ports be a number (like 3 or 4)
or will it be an address in hex?  When my system
    boots, I see numbers (3 or 4-I think) and addresses (in hex) assigned to
my comm ports; and I was wondering what I should 
    use for the irq when I call interrupt functions like rtl_request_irq( ).

Thank you very much.

Bill