5
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 */ |
---|
13 | int 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.