Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2014-01-17T17:26:48Z (8 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
5828554, cf982ff
Parents:
61b5b73d (diff), 66be0288 (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 libdrv cleanup.

  • move 'client side' device iface to libdrv (from libc)
  • hide remote_* libdrv headers
  • add a bunch of const qualifiers and change static data to const
  • cleanup: index initialized arrays, array size macro, removes duplicit enums, …

TODO

move hw_res, pio_window and co to libdrv. (too entangled with libc to move right now)
move clock_dev iface to libdrv. (also tied to libc, we need a time provider solution)

File:
1 edited

Legend:

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

    r61b5b73d r476f62c  
    3535#include <errno.h>
    3636#include <async.h>
     37#include <macros.h>
    3738
    3839#include "ops/graph_dev.h"
     40#include "graph_iface.h"
    3941#include "ddf/driver.h"
     42
     43typedef enum {
     44        GRAPH_DEV_CONNECT = 0
     45} graph_dev_method_t;
     46
     47int graph_dev_connect(async_sess_t *sess)
     48{
     49        async_exch_t *exch = async_exchange_begin(sess);
     50        int ret = async_req_1_0(exch, DEV_IFACE_ID(GRAPH_DEV_IFACE), GRAPH_DEV_CONNECT);
     51        async_exchange_end(exch);
     52
     53        return ret;
     54}
    4055
    4156static void remote_graph_connect(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    4257
    43 static remote_iface_func_ptr_t remote_graph_dev_iface_ops[] = {
    44         &remote_graph_connect
     58static const remote_iface_func_ptr_t remote_graph_dev_iface_ops[] = {
     59        [GRAPH_DEV_CONNECT] = remote_graph_connect
    4560};
    4661
    47 remote_iface_t remote_graph_dev_iface = {
    48         .method_count = sizeof(remote_graph_dev_iface_ops) /
    49             sizeof(remote_iface_func_ptr_t),
     62const remote_iface_t remote_graph_dev_iface = {
     63        .method_count = ARRAY_SIZE(remote_graph_dev_iface_ops),
    5064        .methods = remote_graph_dev_iface_ops
    5165};
Note: See TracChangeset for help on using the changeset viewer.