Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_hw_res.c

    r984a9ba r443695e  
    11/*
     2 * Copyright (c) 2024 Jiri Svoboda
    23 * Copyright (c) 2010 Lenka Trochtova
    34 * Copyright (c) 2011 Jan Vesely
     
    4748static void remote_hw_res_dma_channel_setup(ddf_fun_t *, void *, ipc_call_t *);
    4849static void remote_hw_res_dma_channel_remain(ddf_fun_t *, void *, ipc_call_t *);
     50static void remote_hw_res_get_flags(ddf_fun_t *, void *, ipc_call_t *);
    4951
    5052static const remote_iface_func_ptr_t remote_hw_res_iface_ops [] = {
     
    5557        [HW_RES_DMA_CHANNEL_SETUP] = &remote_hw_res_dma_channel_setup,
    5658        [HW_RES_DMA_CHANNEL_REMAIN] = &remote_hw_res_dma_channel_remain,
     59        [HW_RES_GET_FLAGS] = &remote_hw_res_get_flags
    5760};
    5861
     
    103106
    104107        const int irq = DEV_IPC_GET_ARG1(*call);
    105         const errno_t ret = hw_res_ops->enable_interrupt(fun, irq);
     108        const errno_t ret = hw_res_ops->clear_interrupt(fun, irq);
    106109        async_answer_0(call, ret);
    107110}
     
    171174}
    172175
     176static void remote_hw_res_get_flags(ddf_fun_t *fun, void *ops,
     177    ipc_call_t *call)
     178{
     179        hw_res_ops_t *hw_res_ops = ops;
     180
     181        if (hw_res_ops->get_flags == NULL) {
     182                async_answer_0(call, ENOTSUP);
     183                return;
     184        }
     185
     186        hw_res_flags_t flags = 0;
     187        const errno_t ret = hw_res_ops->get_flags(fun, &flags);
     188        async_answer_1(call, ret, flags);
     189}
     190
    173191/**
    174192 * @}
Note: See TracChangeset for help on using the changeset viewer.