Changeset d51838f in mainline for uspace/lib/c/generic/device/hw_res.c


Ignore:
Timestamp:
2017-10-14T22:49:18Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
75911d24
Parents:
ce732e74
Message:

Let leaf drivers enable/disable/clear interrupts via hw_res instead of directly using irc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/hw_res.c

    rce732e74 rd51838f  
    8686}
    8787
     88int hw_res_disable_interrupt(async_sess_t *sess, int irq)
     89{
     90        async_exch_t *exch = async_exchange_begin(sess);
     91       
     92        int rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
     93            HW_RES_DISABLE_INTERRUPT, irq);
     94        async_exchange_end(exch);
     95       
     96        return rc;
     97}
     98
     99int hw_res_clear_interrupt(async_sess_t *sess, int irq)
     100{
     101        async_exch_t *exch = async_exchange_begin(sess);
     102       
     103        int rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
     104            HW_RES_CLEAR_INTERRUPT, irq);
     105        async_exchange_end(exch);
     106       
     107        return rc;
     108}
     109
    88110/** Setup DMA channel to specified place and mode.
    89111 *
Note: See TracChangeset for help on using the changeset viewer.