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


Ignore:
Timestamp:
2017-10-17T13:11:35Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60af4cdb
Parents:
dbf32b1 (diff), a416d070 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline

File:
1 edited

Legend:

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

    rdbf32b1 r95c675b  
    7575}
    7676
    77 bool hw_res_enable_interrupt(async_sess_t *sess)
     77int hw_res_enable_interrupt(async_sess_t *sess, int irq)
    7878{
    7979        async_exch_t *exch = async_exchange_begin(sess);
    8080       
    81         int rc = async_req_1_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    82             HW_RES_ENABLE_INTERRUPT);
     81        int rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
     82            HW_RES_ENABLE_INTERRUPT, irq);
    8383        async_exchange_end(exch);
    8484       
    85         return (rc == EOK);
     85        return rc;
     86}
     87
     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;
    86108}
    87109
Note: See TracChangeset for help on using the changeset viewer.