source: rtems/cpukit/libdrvmgr/drvmgr_func_call.c @ 7075fb11

5
Last change on this file since 7075fb11 was 0decc806, checked in by Daniel Hellstrom <daniel@…>, on 04/09/15 at 14:09:13

DRVMGR: updated license to rtems.org

  • Property mode set to 100644
File size: 628 bytes
Line 
1/* Driver Manager optional dynamic function interface
2 *
3 * COPYRIGHT (c) 2011 Cobham Gaisler AB.
4 *
5 * The license and distribution terms for this file may be
6 * found in the file LICENSE in this distribution or at
7 * http://www.rtems.org/license/LICENSE.
8 */
9
10#include <drvmgr/drvmgr.h>
11
12/* Lookup function from function ID and call it using given arguments */
13int drvmgr_func_call(void *obj, int funcid, void *a, void *b, void *c, void *d)
14{
15        int (*func)(void *arg1, void *arg2, void *arg3, void *arg4) = NULL;
16
17        if (drvmgr_func_get(obj, funcid, (void *)&func) != DRVMGR_OK)
18                return DRVMGR_FAIL;
19        return func(a, b, c, d);
20}
Note: See TracBrowser for help on using the repository browser.