Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7f8b581 in mainline for uspace/srv/drivers/serial/serial.c


Ignore:
Timestamp:
2010-04-29T21:26:17Z (12 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master
Children:
2300b9d
Parents:
cfe7716
Message:

provide a mechanism which enables the driver to register several interrupt handlers for several devices and irqs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/drivers/serial/serial.c

    rcfe7716 r7f8b581  
    267267}
    268268
     269static void serial_interrupt_handler(device_t *dev, ipc_callid_t iid, ipc_call_t *icall)
     270{
     271        // TODO
     272}
     273
     274static inline int serial_register_interrupt_handler(device_t *dev)
     275{
     276        serial_dev_data_t *data = (serial_dev_data_t *)dev->driver_data;
     277       
     278        return register_interrupt_handler(dev, data->irq, serial_interrupt_handler, NULL);
     279       
     280}
     281
    269282static int serial_add_device(device_t *dev)
    270283{
     
    290303        serial_initialize_port(dev);
    291304       
    292         // TODO register interrupt handler
     305        // register interrupt handler
     306        if (0 != serial_register_interrupt_handler(dev)) {
     307               
     308        }
    293309       
    294310        // enable interrupt
Note: See TracChangeset for help on using the changeset viewer.