Changeset 77ad86c in mainline


Ignore:
Timestamp:
2012-06-01T19:00:32Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b713ff80
Parents:
4e5dabf
Message:

cstyle (no change in functionality)

Location:
uspace/lib
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inet.c

    r4e5dabf r77ad86c  
    4444{
    4545        async_exch_t *exch = async_exchange_begin(inet_sess);
    46 
     46       
    4747        ipc_call_t answer;
    4848        aid_t req = async_send_0(exch, INET_CALLBACK_CREATE, &answer);
    4949        int rc = async_connect_to_me(exch, 0, 0, 0, inet_cb_conn, NULL);
    5050        async_exchange_end(exch);
    51 
     51       
    5252        if (rc != EOK)
    5353                return rc;
    54 
     54       
    5555        sysarg_t retval;
    5656        async_wait_for(req, &retval);
    57         if (retval != EOK)
    58                 return retval;
    59 
    60         return EOK;
     57       
     58        return retval;
    6159}
    6260
    6361static int inet_set_proto(uint8_t protocol)
    6462{
    65         int rc;
    66 
    6763        async_exch_t *exch = async_exchange_begin(inet_sess);
    68         rc = async_req_1_0(exch, INET_SET_PROTO, protocol);
     64        int rc = async_req_1_0(exch, INET_SET_PROTO, protocol);
    6965        async_exchange_end(exch);
    70 
     66       
    7167        return rc;
    7268}
     
    8076        assert(inet_ev_ops == NULL);
    8177        assert(inet_protocol == 0);
    82 
     78       
    8379        rc = loc_service_get_id(SERVICE_NAME_INET, &inet_svc,
    8480            IPC_FLAG_BLOCKING);
    8581        if (rc != EOK)
    8682                return ENOENT;
    87 
     83       
    8884        inet_sess = loc_service_connect(EXCHANGE_SERIALIZE, inet_svc,
    8985            IPC_FLAG_BLOCKING);
    9086        if (inet_sess == NULL)
    9187                return ENOENT;
    92 
     88       
    9389        if (inet_set_proto(protocol) != EOK) {
    9490                async_hangup(inet_sess);
     
    9692                return EIO;
    9793        }
    98 
     94       
    9995        if (inet_callback_create() != EOK) {
    10096                async_hangup(inet_sess);
     
    10298                return EIO;
    10399        }
    104 
     100       
    105101        inet_protocol = protocol;
    106102        inet_ev_ops = ev_ops;
  • uspace/lib/c/generic/inetcfg.c

    r4e5dabf r77ad86c  
    119119
    120120        assert(inetcfg_sess == NULL);
    121 
     121       
    122122        rc = loc_service_get_id(SERVICE_NAME_INETCFG, &inet_svc,
    123123            IPC_FLAG_BLOCKING);
    124124        if (rc != EOK)
    125125                return ENOENT;
    126 
     126       
    127127        inetcfg_sess = loc_service_connect(EXCHANGE_SERIALIZE, inet_svc,
    128128            IPC_FLAG_BLOCKING);
    129129        if (inetcfg_sess == NULL)
    130130                return ENOENT;
    131 
     131       
    132132        return EOK;
    133133}
  • uspace/lib/c/generic/inetping.c

    r4e5dabf r77ad86c  
    4949
    5050        assert(inetping_sess == NULL);
    51 
     51       
    5252        inetping_ev_ops = ev_ops;
    53 
     53       
    5454        rc = loc_service_get_id(SERVICE_NAME_INETPING, &inetping_svc,
    5555            IPC_FLAG_BLOCKING);
    5656        if (rc != EOK)
    5757                return ENOENT;
    58 
     58       
    5959        inetping_sess = loc_service_connect(EXCHANGE_SERIALIZE, inetping_svc,
    6060            IPC_FLAG_BLOCKING);
    6161        if (inetping_sess == NULL)
    6262                return ENOENT;
    63 
     63       
    6464        async_exch_t *exch = async_exchange_begin(inetping_sess);
    6565
    6666        rc = async_connect_to_me(exch, 0, 0, 0, inetping_cb_conn, NULL);
    6767        async_exchange_end(exch);
    68 
     68       
    6969        if (rc != EOK) {
    7070                async_hangup(inetping_sess);
     
    7272                return rc;
    7373        }
    74 
     74       
    7575        return EOK;
    7676}
  • uspace/lib/c/generic/iplink.c

    r4e5dabf r77ad86c  
    4949    iplink_t **riplink)
    5050{
    51         iplink_t *iplink = NULL;
    52         int rc;
    53 
    54         iplink = calloc(1, sizeof(iplink_t));
     51        iplink_t *iplink = calloc(1, sizeof(iplink_t));
    5552        if (iplink == NULL)
    5653                return ENOMEM;
    57 
     54       
    5855        iplink->sess = sess;
    5956        iplink->ev_ops = ev_ops;
    60 
     57       
    6158        async_exch_t *exch = async_exchange_begin(sess);
    62 
    63         rc = async_connect_to_me(exch, 0, 0, 0, iplink_cb_conn, iplink);
     59       
     60        int rc = async_connect_to_me(exch, 0, 0, 0, iplink_cb_conn, iplink);
    6461        async_exchange_end(exch);
    65 
     62       
    6663        if (rc != EOK)
    6764                goto error;
    68 
     65       
    6966        *riplink = iplink;
    7067        return EOK;
    71 
     68       
    7269error:
    7370        if (iplink != NULL)
    7471                free(iplink);
    75 
     72       
    7673        return rc;
    7774}
  • uspace/lib/c/generic/net/socket_client.c

    r4e5dabf r77ad86c  
    283283static async_sess_t *socket_get_tcp_sess(void)
    284284{
    285         if (socket_globals.tcp_sess == NULL) {
     285        if (socket_globals.tcp_sess == NULL)
    286286                socket_globals.tcp_sess = service_bind(SERVICE_TCP,
    287287                    0, 0, SERVICE_TCP, socket_connection);
    288         }
    289 
     288       
    290289        return socket_globals.tcp_sess;
    291290}
     
    300299static async_sess_t *socket_get_udp_sess(void)
    301300{
    302         if (socket_globals.udp_sess == NULL) {
     301        if (socket_globals.udp_sess == NULL)
    303302                socket_globals.udp_sess = service_bind(SERVICE_UDP,
    304303                    0, 0, SERVICE_UDP, socket_connection);
    305         }
    306 
     304       
    307305        return socket_globals.udp_sess;
    308306}
  • uspace/lib/drv/generic/driver.c

    r4e5dabf r77ad86c  
    125125static void driver_dev_add(ipc_callid_t iid, ipc_call_t *icall)
    126126{
    127         char *dev_name = NULL;
    128         int res;
    129        
    130127        devman_handle_t dev_handle = IPC_GET_ARG1(*icall);
    131128        devman_handle_t parent_fun_handle = IPC_GET_ARG2(*icall);
    132129       
    133130        ddf_dev_t *dev = create_device();
    134 
     131       
    135132        /* Add one reference that will be dropped by driver_dev_remove() */
    136133        dev_add_ref(dev);
    137134        dev->handle = dev_handle;
    138 
     135       
     136        char *dev_name = NULL;
    139137        async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0);
    140138        dev->name = dev_name;
    141 
     139       
    142140        /*
    143141         * Currently not used, parent fun handle is stored in context
     
    146144        (void) parent_fun_handle;
    147145       
    148         res = driver->driver_ops->dev_add(dev);
     146        int res = driver->driver_ops->dev_add(dev);
    149147       
    150148        if (res != EOK) {
     
    163161static void driver_dev_remove(ipc_callid_t iid, ipc_call_t *icall)
    164162{
    165         devman_handle_t devh;
    166         ddf_dev_t *dev;
    167         int rc;
    168        
    169         devh = IPC_GET_ARG1(*icall);
     163        devman_handle_t devh = IPC_GET_ARG1(*icall);
    170164       
    171165        fibril_mutex_lock(&devices_mutex);
    172         dev = driver_get_device(devh);
     166        ddf_dev_t *dev = driver_get_device(devh);
    173167        if (dev != NULL)
    174168                dev_add_ref(dev);
     
    179173                return;
    180174        }
     175       
     176        int rc;
    181177       
    182178        if (driver->driver_ops->dev_remove != NULL)
     
    193189static void driver_dev_gone(ipc_callid_t iid, ipc_call_t *icall)
    194190{
    195         devman_handle_t devh;
    196         ddf_dev_t *dev;
    197         int rc;
    198        
    199         devh = IPC_GET_ARG1(*icall);
     191        devman_handle_t devh = IPC_GET_ARG1(*icall);
    200192       
    201193        fibril_mutex_lock(&devices_mutex);
    202         dev = driver_get_device(devh);
     194        ddf_dev_t *dev = driver_get_device(devh);
    203195        if (dev != NULL)
    204196                dev_add_ref(dev);
     
    209201                return;
    210202        }
     203       
     204        int rc;
    211205       
    212206        if (driver->driver_ops->dev_gone != NULL)
     
    223217static void driver_fun_online(ipc_callid_t iid, ipc_call_t *icall)
    224218{
    225         devman_handle_t funh;
    226         ddf_fun_t *fun;
    227         int rc;
    228        
    229         funh = IPC_GET_ARG1(*icall);
     219        devman_handle_t funh = IPC_GET_ARG1(*icall);
    230220       
    231221        /*
     
    236226        fibril_mutex_lock(&functions_mutex);
    237227       
    238         fun = driver_get_function(funh);
     228        ddf_fun_t *fun = driver_get_function(funh);
    239229        if (fun != NULL)
    240230                fun_add_ref(fun);
     
    248238       
    249239        /* Call driver entry point */
     240        int rc;
     241       
    250242        if (driver->driver_ops->fun_online != NULL)
    251243                rc = driver->driver_ops->fun_online(fun);
     
    260252static void driver_fun_offline(ipc_callid_t iid, ipc_call_t *icall)
    261253{
    262         devman_handle_t funh;
    263         ddf_fun_t *fun;
    264         int rc;
    265        
    266         funh = IPC_GET_ARG1(*icall);
     254        devman_handle_t funh = IPC_GET_ARG1(*icall);
    267255       
    268256        /*
     
    273261        fibril_mutex_lock(&functions_mutex);
    274262       
    275         fun = driver_get_function(funh);
     263        ddf_fun_t *fun = driver_get_function(funh);
    276264        if (fun != NULL)
    277265                fun_add_ref(fun);
     
    285273       
    286274        /* Call driver entry point */
     275        int rc;
     276       
    287277        if (driver->driver_ops->fun_offline != NULL)
    288278                rc = driver->driver_ops->fun_offline(fun);
     
    597587void *ddf_dev_data_alloc(ddf_dev_t *dev, size_t size)
    598588{
    599         void *data;
    600 
    601589        assert(dev->driver_data == NULL);
    602 
    603         data = calloc(1, size);
     590       
     591        void *data = calloc(1, size);
    604592        if (data == NULL)
    605593                return NULL;
    606 
     594       
    607595        dev->driver_data = data;
    608596        return data;
     
    634622ddf_fun_t *ddf_fun_create(ddf_dev_t *dev, fun_type_t ftype, const char *name)
    635623{
    636         ddf_fun_t *fun;
    637 
    638         fun = create_function();
     624        ddf_fun_t *fun = create_function();
    639625        if (fun == NULL)
    640626                return NULL;
    641 
     627       
    642628        /* Add one reference that will be dropped by ddf_fun_destroy() */
    643629        fun->dev = dev;
    644630        fun_add_ref(fun);
    645 
     631       
    646632        fun->bound = false;
    647633        fun->ftype = ftype;
    648 
     634       
    649635        fun->name = str_dup(name);
    650636        if (fun->name == NULL) {
     
    652638                return NULL;
    653639        }
    654 
     640       
    655641        return fun;
    656642}
     
    659645void *ddf_fun_data_alloc(ddf_fun_t *fun, size_t size)
    660646{
    661         void *data;
    662 
    663647        assert(fun->bound == false);
    664648        assert(fun->driver_data == NULL);
    665 
    666         data = calloc(1, size);
     649       
     650        void *data = calloc(1, size);
    667651        if (data == NULL)
    668652                return NULL;
    669 
     653       
    670654        fun->driver_data = data;
    671655        return data;
     
    677661 * must not be bound.
    678662 *
    679  * @param fun           Function to destroy
     663 * @param fun Function to destroy
     664 *
    680665 */
    681666void ddf_fun_destroy(ddf_fun_t *fun)
    682667{
    683668        assert(fun->bound == false);
    684 
     669       
    685670        /*
    686671         * Drop the reference added by ddf_fun_create(). This will deallocate
     
    697682        if (fun->ops == NULL)
    698683                return NULL;
     684       
    699685        return fun->ops->interfaces[idx];
    700686}
     
    709695 * the same name.
    710696 *
    711  * @param fun           Function to bind
    712  * @return              EOK on success or negative error code
     697 * @param fun Function to bind
     698 *
     699 * @return EOK on success or negative error code
     700 *
    713701 */
    714702int ddf_fun_bind(ddf_fun_t *fun)
     
    717705        assert(fun->name != NULL);
    718706       
    719         int res;
    720        
    721707        add_to_functions_list(fun);
    722         res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,
     708        int res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,
    723709            fun->dev->handle, &fun->handle);
    724710        if (res != EOK) {
     
    736722 * the function invisible to the system.
    737723 *
    738  * @param fun           Function to unbind
    739  * @return              EOK on success or negative error code
     724 * @param fun Function to unbind
     725 *
     726 * @return EOK on success or negative error code
     727 *
    740728 */
    741729int ddf_fun_unbind(ddf_fun_t *fun)
    742730{
    743         int res;
    744        
    745731        assert(fun->bound == true);
    746732       
    747         res = devman_remove_function(fun->handle);
     733        int res = devman_remove_function(fun->handle);
    748734        if (res != EOK)
    749735                return res;
    750 
     736       
    751737        remove_from_functions_list(fun);
    752738       
     
    757743/** Online function.
    758744 *
    759  * @param fun           Function to online
    760  * @return              EOK on success or negative error code
     745 * @param fun Function to online
     746 *
     747 * @return EOK on success or negative error code
     748 *
    761749 */
    762750int ddf_fun_online(ddf_fun_t *fun)
    763751{
    764         int res;
    765        
    766752        assert(fun->bound == true);
    767753       
    768         res = devman_drv_fun_online(fun->handle);
     754        int res = devman_drv_fun_online(fun->handle);
    769755        if (res != EOK)
    770756                return res;
     
    775761/** Offline function.
    776762 *
    777  * @param fun           Function to offline
    778  * @return              EOK on success or negative error code
     763 * @param fun Function to offline
     764 *
     765 * @return EOK on success or negative error code
     766 *
    779767 */
    780768int ddf_fun_offline(ddf_fun_t *fun)
    781769{
    782         int res;
    783        
    784770        assert(fun->bound == true);
    785771       
    786         res = devman_drv_fun_offline(fun->handle);
     772        int res = devman_drv_fun_offline(fun->handle);
    787773        if (res != EOK)
    788774                return res;
     
    796782 * Cannot be called when the function node is bound.
    797783 *
    798  * @param fun                   Function
    799  * @param match_id_str          Match string
    800  * @param match_score           Match score
    801  * @return                      EOK on success, ENOMEM if out of memory.
     784 * @param fun          Function
     785 * @param match_id_str Match string
     786 * @param match_score  Match score
     787 *
     788 * @return EOK on success.
     789 * @return ENOMEM if out of memory.
     790 *
    802791 */
    803792int ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,
    804793    int match_score)
    805794{
    806         match_id_t *match_id;
    807        
    808795        assert(fun->bound == false);
    809796        assert(fun->ftype == fun_inner);
    810797       
    811         match_id = create_match_id();
     798        match_id_t *match_id = create_match_id();
    812799        if (match_id == NULL)
    813800                return ENOMEM;
     
    831818 *
    832819 * Must only be called when the function is bound.
     820 *
    833821 */
    834822int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
     
    842830int ddf_driver_main(driver_t *drv)
    843831{
    844         int rc;
    845 
    846832        /*
    847833         * Remember the driver structure - driver_ops will be called by generic
     
    858844         */
    859845        async_set_client_connection(driver_connection);
    860         rc = devman_driver_register(driver->name);
     846        int rc = devman_driver_register(driver->name);
    861847        if (rc != EOK) {
    862848                printf("Error: Failed to register driver with device manager "
     
    864850                    str_error(rc));
    865851               
    866                 return 1;
     852                return rc;
    867853        }
    868854       
     
    870856        rc = task_retval(0);
    871857        if (rc != EOK)
    872                 return 1;
    873 
     858                return rc;
     859       
    874860        async_manager();
    875861       
    876862        /* Never reached. */
    877         return 0;
     863        return EOK;
    878864}
    879865
  • uspace/lib/drv/generic/interrupt.c

    r4e5dabf r77ad86c  
    117117}
    118118
    119 static void
    120 add_interrupt_context(interrupt_context_list_t *list, interrupt_context_t *ctx)
     119static void add_interrupt_context(interrupt_context_list_t *list,
     120    interrupt_context_t *ctx)
    121121{
    122122        fibril_mutex_lock(&list->mutex);
     
    134134}
    135135
    136 static interrupt_context_t *
    137 find_interrupt_context_by_id(interrupt_context_list_t *list, int id)
     136static interrupt_context_t *find_interrupt_context_by_id(
     137    interrupt_context_list_t *list, int id)
    138138{
    139139        interrupt_context_t *ctx;
     
    153153}
    154154
    155 static interrupt_context_t *
    156 find_interrupt_context(interrupt_context_list_t *list, ddf_dev_t *dev, int irq)
     155static interrupt_context_t *find_interrupt_context(
     156    interrupt_context_list_t *list, ddf_dev_t *dev, int irq)
    157157{
    158158        interrupt_context_t *ctx;
     
    173173
    174174
    175 int
    176 register_interrupt_handler(ddf_dev_t *dev, int irq, interrupt_handler_t *handler,
    177     irq_code_t *pseudocode)
     175int register_interrupt_handler(ddf_dev_t *dev, int irq,
     176    interrupt_handler_t *handler, irq_code_t *pseudocode)
    178177{
    179178        interrupt_context_t *ctx = create_interrupt_context();
     
    193192                delete_interrupt_context(ctx);
    194193        }
    195 
     194       
    196195        return res;
    197196}
  • uspace/lib/drv/generic/log.c

    r4e5dabf r77ad86c  
    3333#include <io/log.h>
    3434#include <stdarg.h>
    35 
    3635#include <ddf/log.h>
    3736
    3837/** Initialize the logging system.
    3938 *
    40  * @param drv_name      Driver name, will be printed as part of message
    41  * @param level         Minimum message level to print
     39 * @param drv_name Driver name, will be printed as part of message
     40 * @param level    Minimum message level to print
     41 *
    4242 */
    4343int ddf_log_init(const char *drv_name, log_level_t level)
     
    4848/** Log a driver message.
    4949 *
    50  * @param level         Message verbosity level. Message is only printed
    51  *                      if verbosity is less than or equal to current
    52  *                      reporting level.
    53  * @param fmt           Format string (no trailing newline)
     50 * @param level Message verbosity level. Message is only printed
     51 *              if verbosity is less than or equal to current
     52 *              reporting level.
     53 * @param fmt   Format string (no trailing newline)
     54 *
    5455 */
    5556void ddf_msg(log_level_t level, const char *fmt, ...)
    5657{
    5758        va_list args;
    58 
     59       
    5960        va_start(args, fmt);
    6061        log_msgv(level, fmt, args);
  • uspace/lib/drv/include/ddf/driver.h

    r4e5dabf r77ad86c  
    8181         */
    8282        devman_handle_t handle;
     83       
    8384        /** Reference count */
    8485        atomic_t refcnt;
     
    104105        /** True if bound to the device manager */
    105106        bool bound;
     107       
    106108        /** Function indentifier (asigned by device manager) */
    107109        devman_handle_t handle;
     110       
    108111        /** Reference count */
    109112        atomic_t refcnt;
     
    114117        /** Function type */
    115118        fun_type_t ftype;
     119       
    116120        /** Function name */
    117121        const char *name;
     122       
    118123        /** List of device ids for driver matching */
    119124        match_id_list_t match_ids;
     125       
    120126        /** Driver-specific data associated with this function */
    121127        void *driver_data;
     128       
    122129        /** Implementation of operations provided by this function */
    123130        ddf_dev_ops_t *ops;
     131       
    124132        /** Connection handler or @c NULL to use the DDF default handler. */
    125133        async_client_conn_t conn_handler;
     
    137145        /** Callback method for passing a new device to the device driver */
    138146        int (*dev_add)(ddf_dev_t *);
     147       
    139148        /** Ask driver to remove a device */
    140149        int (*dev_remove)(ddf_dev_t *);
     150       
    141151        /** Inform driver a device disappeared */
    142152        int (*dev_gone)(ddf_dev_t *);
     153       
    143154        /** Ask driver to online a specific function */
    144155        int (*fun_online)(ddf_fun_t *);
     156       
    145157        /** Ask driver to offline a specific function */
    146158        int (*fun_offline)(ddf_fun_t *);
  • uspace/lib/drv/include/ddf/interrupt.h

    r4e5dabf r77ad86c  
    4242#include <ddi.h>
    4343#include <fibril_synch.h>
    44 
    4544#include "driver.h"
    4645#include "../dev_iface.h"
  • uspace/lib/drv/include/ops/hw_res.h

    r4e5dabf r77ad86c  
    3939#include <device/hw_res.h>
    4040#include <sys/types.h>
    41 
    4241#include "../ddf/driver.h"
    4342
  • uspace/lib/drv/include/ops/nic.h

    r4e5dabf r77ad86c  
    4040#include <nic/nic.h>
    4141#include <sys/time.h>
    42 
    4342#include "../ddf/driver.h"
    4443
  • uspace/lib/nic/include/nic.h

    r4e5dabf r77ad86c  
    8383 */
    8484typedef void (*send_frame_handler)(nic_t *, void *, size_t);
     85
    8586/**
    8687 * The handler for transitions between driver states.
     
    9495 */
    9596typedef int (*state_change_handler)(nic_t *);
     97
    9698/**
    9799 * Handler for unicast filtering mode change.
     
    106108 */
    107109typedef int (*unicast_mode_change_handler)(nic_t *,
    108         nic_unicast_mode_t, const nic_address_t *, size_t);
     110    nic_unicast_mode_t, const nic_address_t *, size_t);
     111
    109112/**
    110113 * Handler for multicast filtering mode change.
     
    119122 */
    120123typedef int (*multicast_mode_change_handler)(nic_t *,
    121         nic_multicast_mode_t, const nic_address_t *, size_t);
     124    nic_multicast_mode_t, const nic_address_t *, size_t);
     125
    122126/**
    123127 * Handler for broadcast filtering mode change.
     
    130134 */
    131135typedef int (*broadcast_mode_change_handler)(nic_t *, nic_broadcast_mode_t);
     136
    132137/**
    133138 * Handler for blocked sources list change.
     
    138143 */
    139144typedef void (*blocked_sources_change_handler)(nic_t *,
    140         const nic_address_t *, size_t);
     145    const nic_address_t *, size_t);
     146
    141147/**
    142148 * Handler for VLAN filtering mask change.
     
    145151 */
    146152typedef void (*vlan_mask_change_handler)(nic_t *, const nic_vlan_mask_t *);
     153
    147154/**
    148155 * Handler called when a WOL virtue is added.
     
    165172 */
    166173typedef int (*wol_virtue_add_handler)(nic_t *, const nic_wol_virtue_t *);
     174
    167175/**
    168176 * Handler called when a WOL virtue is removed.
     
    174182 */
    175183typedef void (*wol_virtue_remove_handler)(nic_t *, const nic_wol_virtue_t *);
     184
    176185/**
    177186 * Handler for poll mode change.
     
    186195 */
    187196typedef int (*poll_mode_change_handler)(nic_t *,
    188         nic_poll_mode_t, const struct timeval *);
     197    nic_poll_mode_t, const struct timeval *);
     198
    189199/**
    190200 * Event handler called when the NIC should poll its buffers for a new frame
     
    202212extern int nic_driver_init(const char *);
    203213extern void nic_driver_implement(driver_ops_t *, ddf_dev_ops_t *,
    204         nic_iface_t *);
     214    nic_iface_t *);
    205215
    206216/* Functions called in add_device */
     
    210220extern void nic_set_send_frame_handler(nic_t *, send_frame_handler);
    211221extern void nic_set_state_change_handlers(nic_t *,
    212         state_change_handler, state_change_handler, state_change_handler);
     222    state_change_handler, state_change_handler, state_change_handler);
    213223extern void nic_set_filtering_change_handlers(nic_t *,
    214         unicast_mode_change_handler, multicast_mode_change_handler,
    215         broadcast_mode_change_handler, blocked_sources_change_handler,
    216         vlan_mask_change_handler);
     224    unicast_mode_change_handler, multicast_mode_change_handler,
     225    broadcast_mode_change_handler, blocked_sources_change_handler,
     226    vlan_mask_change_handler);
    217227extern void nic_set_wol_virtue_change_handlers(nic_t *,
    218         wol_virtue_add_handler, wol_virtue_remove_handler);
     228    wol_virtue_add_handler, wol_virtue_remove_handler);
    219229extern void nic_set_poll_handlers(nic_t *,
    220         poll_mode_change_handler, poll_request_handler);
     230    poll_mode_change_handler, poll_request_handler);
    221231
    222232/* General driver functions */
     
    254264extern void nic_report_hw_filtering(nic_t *, int, int, int);
    255265extern void nic_query_unicast(const nic_t *,
    256         nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
     266    nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
    257267extern void nic_query_multicast(const nic_t *,
    258         nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
     268    nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
    259269extern void nic_query_broadcast(const nic_t *, nic_broadcast_mode_t *);
    260270extern void nic_query_blocked_sources(const nic_t *,
    261         size_t, nic_address_t *, size_t *);
     271    size_t, nic_address_t *, size_t *);
    262272extern int nic_query_vlan_mask(const nic_t *, nic_vlan_mask_t *);
    263273extern int nic_query_wol_max_caps(const nic_t *, nic_wv_type_t);
  • uspace/lib/nic/include/nic_impl.h

    r4e5dabf r77ad86c  
    5353extern int nic_get_stats_impl(ddf_fun_t *dev_fun, nic_device_stats_t *stats);
    5454extern int nic_unicast_get_mode_impl(ddf_fun_t *dev_fun,
    55         nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
     55    nic_unicast_mode_t *, size_t, nic_address_t *, size_t *);
    5656extern int nic_unicast_set_mode_impl(ddf_fun_t *dev_fun,
    57         nic_unicast_mode_t, const nic_address_t *, size_t);
     57    nic_unicast_mode_t, const nic_address_t *, size_t);
    5858extern int nic_multicast_get_mode_impl(ddf_fun_t *dev_fun,
    59         nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
     59    nic_multicast_mode_t *, size_t, nic_address_t *, size_t *);
    6060extern int nic_multicast_set_mode_impl(ddf_fun_t *dev_fun,
    61         nic_multicast_mode_t, const nic_address_t *, size_t);
     61    nic_multicast_mode_t, const nic_address_t *, size_t);
    6262extern int nic_broadcast_get_mode_impl(ddf_fun_t *, nic_broadcast_mode_t *);
    6363extern int nic_broadcast_set_mode_impl(ddf_fun_t *, nic_broadcast_mode_t);
    6464extern int nic_blocked_sources_get_impl(ddf_fun_t *,
    65         size_t, nic_address_t *, size_t *);
     65    size_t, nic_address_t *, size_t *);
    6666extern int nic_blocked_sources_set_impl(ddf_fun_t *, const nic_address_t *, size_t);
    6767extern int nic_vlan_get_mask_impl(ddf_fun_t *, nic_vlan_mask_t *);
    6868extern int nic_vlan_set_mask_impl(ddf_fun_t *, const nic_vlan_mask_t *);
    6969extern int nic_wol_virtue_add_impl(ddf_fun_t *dev_fun, nic_wv_type_t type,
    70         const void *data, size_t length, nic_wv_id_t *new_id);
     70    const void *data, size_t length, nic_wv_id_t *new_id);
    7171extern int nic_wol_virtue_remove_impl(ddf_fun_t *dev_fun, nic_wv_id_t id);
    7272extern int nic_wol_virtue_probe_impl(ddf_fun_t *dev_fun, nic_wv_id_t id,
    73         nic_wv_type_t *type, size_t max_length, void *data, size_t *length);
     73    nic_wv_type_t *type, size_t max_length, void *data, size_t *length);
    7474extern int nic_wol_virtue_list_impl(ddf_fun_t *dev_fun, nic_wv_type_t type,
    75         size_t max_count, nic_wv_id_t *id_list, size_t *id_count);
     75    size_t max_count, nic_wv_id_t *id_list, size_t *id_count);
    7676extern int nic_wol_virtue_get_caps_impl(ddf_fun_t *, nic_wv_type_t, int *);
    7777extern int nic_poll_get_mode_impl(ddf_fun_t *,
    78         nic_poll_mode_t *, struct timeval *);
     78    nic_poll_mode_t *, struct timeval *);
    7979extern int nic_poll_set_mode_impl(ddf_fun_t *,
    80         nic_poll_mode_t, const struct timeval *);
     80    nic_poll_mode_t, const struct timeval *);
    8181extern int nic_poll_now_impl(ddf_fun_t *);
    8282
  • uspace/lib/nic/src/nic_driver.c

    r4e5dabf r77ad86c  
    7979}
    8080
    81 /**
    82  * Fill in the default implementations for device options and NIC interface.
     81/** Fill in the default implementations for device options and NIC interface.
    8382 *
    8483 * @param driver_ops
  • uspace/lib/posix/stdbool.h

    r4e5dabf r77ad86c  
    3737
    3838#ifdef LIBC_BOOL_H_
    39 #if (!defined(POSIX_STDIO_H_)) \
    40                 && (!defined(POSIX_STDLIB_H_)) \
    41                 && (!defined(POSIX_STRING_H_))
    42 #error "You can't include bool.h and stdbool.h at the same time."
     39
     40#if (!defined(POSIX_STDIO_H_)) && \
     41    (!defined(POSIX_STDLIB_H_)) && \
     42    (!defined(POSIX_STRING_H_))
     43        #error "You can't include bool.h and stdbool.h at the same time."
    4344#endif
    44 #endif
     45
     46#endif /* LIBC_BOOL_H */
    4547
    4648#define LIBC_BOOL_H_
  • uspace/lib/usb/include/usb/ddfiface.h

    r4e5dabf r77ad86c  
    3333 * Implementations of DDF interfaces functions.
    3434 */
     35
    3536#ifndef LIBUSB_DDFIFACE_H_
    3637#define LIBUSB_DDFIFACE_H_
     
    3940#include <usb_iface.h>
    4041
    41 int usb_iface_get_hc_handle_device_impl(ddf_fun_t *, devman_handle_t *);
    42 int usb_iface_get_my_address_forward_impl(ddf_fun_t *, usb_address_t *);
     42extern int usb_iface_get_hc_handle_device_impl(ddf_fun_t *, devman_handle_t *);
     43extern int usb_iface_get_my_address_forward_impl(ddf_fun_t *, usb_address_t *);
    4344extern usb_iface_t usb_iface_hub_impl;
    4445
    45 int usb_iface_get_my_address_from_device_data(ddf_fun_t *, usb_address_t *);
     46extern int usb_iface_get_my_address_from_device_data(ddf_fun_t *, usb_address_t *);
    4647extern usb_iface_t usb_iface_hub_child_impl;
    4748
    48 int usb_iface_get_hc_handle_hc_impl(ddf_fun_t *, devman_handle_t *);
     49extern int usb_iface_get_hc_handle_hc_impl(ddf_fun_t *, devman_handle_t *);
    4950
    5051#endif
     52
    5153/**
    5254 * @}
  • uspace/lib/usb/include/usb/debug.h

    r4e5dabf r77ad86c  
    8282/** Default log level. */
    8383#ifdef CONFIG_USB_VERBOSE
    84 define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_DEBUG
     84        #define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_DEBUG
    8585#else
    86 define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_INFO
     86        #define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_INFO
    8787#endif
    8888
  • uspace/lib/usb/src/ddfiface.c

    r4e5dabf r77ad86c  
    3333 * Implementations of DDF interfaces functions (actual implementation).
    3434 */
     35
    3536#include <devman.h>
    3637#include <async.h>
  • uspace/lib/usb/src/hc.c

    r4e5dabf r77ad86c  
    2727 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828 */
     29
    2930/** @addtogroup libusb
    3031 * @{
     
    3334 * General communication with host controller driver (implementation).
    3435 */
     36
    3537#include <usb/debug.h>
    3638
     
    4446{
    4547        assert(connection);
     48       
    4649        fibril_mutex_lock(&connection->guard);
    4750        if (connection->ref_count == 0) {
     
    5558                }
    5659        }
     60       
    5761        ++connection->ref_count;
    5862        fibril_mutex_unlock(&connection->guard);
    5963        return EOK;
    6064}
    61 /*----------------------------------------------------------------------------*/
     65
    6266static int usb_hc_connection_del_ref(usb_hc_connection_t *connection)
    6367{
    6468        assert(connection);
     69       
    6570        fibril_mutex_lock(&connection->guard);
    6671        if (connection->ref_count == 0) {
     
    7075                return EOK;
    7176        }
     77       
    7278        --connection->ref_count;
    7379        int ret = EOK;
     
    125131        return rc;
    126132}
    127 /*----------------------------------------------------------------------------*/
     133
    128134void usb_hc_connection_deinitialize(usb_hc_connection_t *connection)
    129135{
     
    140146        fibril_mutex_unlock(&connection->guard);
    141147}
    142 /*----------------------------------------------------------------------------*/
     148
    143149/** Open connection to host controller.
    144150 *
     
    150156        return usb_hc_connection_add_ref(connection);
    151157}
    152 /*----------------------------------------------------------------------------*/
     158
    153159/** Close connection to the host controller.
    154160 *
     
    160166        return usb_hc_connection_del_ref(connection);
    161167}
    162 /*----------------------------------------------------------------------------*/
     168
    163169/** Ask host controller for free address assignment.
    164170 *
     
    182188        return ret == EOK ? address : ret;
    183189}
    184 /*----------------------------------------------------------------------------*/
     190
    185191int usb_hc_bind_address(usb_hc_connection_t * connection,
    186192    usb_address_t address, devman_handle_t handle)
     
    194200        return ret;
    195201}
    196 /*----------------------------------------------------------------------------*/
     202
    197203/** Get handle of USB device with given address.
    198204 *
     
    213219        return ret;
    214220}
    215 /*----------------------------------------------------------------------------*/
     221
    216222int usb_hc_release_address(usb_hc_connection_t *connection,
    217223    usb_address_t address)
     
    225231        return ret;
    226232}
    227 /*----------------------------------------------------------------------------*/
     233
    228234int usb_hc_register_endpoint(usb_hc_connection_t *connection,
    229235    usb_address_t address, usb_endpoint_t endpoint, usb_transfer_type_t type,
     
    239245        return ret;
    240246}
    241 /*----------------------------------------------------------------------------*/
     247
    242248int usb_hc_unregister_endpoint(usb_hc_connection_t *connection,
    243249    usb_address_t address, usb_endpoint_t endpoint, usb_direction_t direction)
     
    252258        return ret;
    253259}
    254 /*----------------------------------------------------------------------------*/
     260
    255261int usb_hc_read(usb_hc_connection_t *connection, usb_address_t address,
    256262    usb_endpoint_t endpoint, uint64_t setup, void *data, size_t size,
     
    266272        return ret;
    267273}
    268 /*----------------------------------------------------------------------------*/
     274
    269275int usb_hc_write(usb_hc_connection_t *connection, usb_address_t address,
    270276    usb_endpoint_t endpoint, uint64_t setup, const void *data, size_t size)
  • uspace/lib/usbdev/include/usb/dev/driver.h

    r4e5dabf r77ad86c  
    3333 * USB device driver framework.
    3434 */
     35
    3536#ifndef LIBUSBDEV_DRIVER_H_
    3637#define LIBUSBDEV_DRIVER_H_
  • uspace/lib/usbdev/include/usb/dev/hub.h

    r4e5dabf r77ad86c  
    3535 * For class specific requests, see usb/classes/hub.h.
    3636 */
     37
    3738#ifndef LIBUSBDEV_HUB_H_
    3839#define LIBUSBDEV_HUB_H_
     
    4344#include <usb/hc.h>
    4445
    45 int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, usb_speed_t,
     46extern int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, usb_speed_t,
    4647    int (*)(void *), void *, usb_address_t *, ddf_dev_ops_t *, void *,
    4748    ddf_fun_t **);
     
    6061} usb_hub_attached_device_t;
    6162
    62 int usb_hub_register_device(usb_hc_connection_t *,
     63extern int usb_hub_register_device(usb_hc_connection_t *,
    6364    const usb_hub_attached_device_t *);
    6465
     
    6970        if (attached_device == NULL)
    7071                return EBADMEM;
     72       
    7173        return usb_hc_release_address(conn, attached_device->address);
    7274}
    7375
    7476#endif
     77
    7578/**
    7679 * @}
  • uspace/lib/usbdev/include/usb/dev/recognise.h

    r4e5dabf r77ad86c  
    3333 * USB device recognition.
    3434 */
     35
    3536#ifndef LIBUSBDEV_RECOGNISE_H_
    3637#define LIBUSBDEV_RECOGNISE_H_
     
    4142#include <ipc/devman.h>
    4243
    43 int usb_device_create_match_ids_from_device_descriptor(
     44extern int usb_device_create_match_ids_from_device_descriptor(
    4445    const usb_standard_device_descriptor_t *, match_id_list_t *);
    4546
    46 int usb_device_create_match_ids_from_interface(
     47extern int usb_device_create_match_ids_from_interface(
    4748    const usb_standard_device_descriptor_t *,
    4849    const usb_standard_interface_descriptor_t *, match_id_list_t *);
    4950
    50 int usb_device_create_match_ids(usb_pipe_t *, match_id_list_t *);
     51extern int usb_device_create_match_ids(usb_pipe_t *, match_id_list_t *);
    5152
    52 int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe,
     53extern int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe,
    5354    ddf_dev_t *, ddf_dev_ops_t *, void *, ddf_fun_t **);
    5455
    5556#endif
     57
    5658/**
    5759 * @}
  • uspace/lib/usbdev/src/altiface.c

    r4e5dabf r77ad86c  
    3333 * Handling alternate interface settings.
    3434 */
     35
    3536#include <usb/dev/driver.h>
    3637#include <usb/dev/request.h>
  • uspace/lib/usbdev/src/hub.c

    r4e5dabf r77ad86c  
    3333 * Functions needed by hub drivers.
    3434 */
     35
    3536#include <usb/dev/hub.h>
    3637#include <usb/dev/pipes.h>
     
    114115        return EOK;
    115116}
    116 
    117117
    118118/** Wrapper for registering attached device to the hub.
     
    160160    ddf_dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun)
    161161{
    162         if (new_fun == NULL || hc_conn == NULL)
     162        if ((new_fun == NULL) || (hc_conn == NULL))
    163163                return EINVAL;
    164164
  • uspace/lib/usbdev/src/recognise.c

    r4e5dabf r77ad86c  
    3333 * Functions for recognition of attached devices.
    3434 */
     35
    3536#include <sys/types.h>
    3637#include <fibril_synch.h>
     
    311312 *      will be written.
    312313 * @return Error code.
     314 *
    313315 */
    314316int usb_device_register_child_in_devman(usb_pipe_t *ctrl_pipe,
     
    318320        if (child_fun == NULL || ctrl_pipe == NULL)
    319321                return EINVAL;
    320 
     322       
    321323        if (!dev_ops && dev_data) {
    322324                usb_log_warning("Using standard fun ops with arbitrary "
    323325                    "driver data. This does not have to work.\n");
    324326        }
    325 
     327       
    326328        /** Index to append after device name for uniqueness. */
    327329        static atomic_t device_name_index = {0};
    328330        const size_t this_device_name_index =
    329331            (size_t) atomic_preinc(&device_name_index);
    330 
     332       
    331333        ddf_fun_t *child = NULL;
    332334        int rc;
    333 
     335       
    334336        /*
    335337         * TODO: Once the device driver framework support persistent
    336338         * naming etc., something more descriptive could be created.
    337339         */
    338         char child_name[12]; /* The format is: "usbAB_aXYZ", length 11 */
     340        char child_name[12];  /* The format is: "usbAB_aXYZ", length 11 */
    339341        rc = snprintf(child_name, sizeof(child_name),
    340342            "usb%02zu_a%d", this_device_name_index, ctrl_pipe->wire->address);
     
    342344                goto failure;
    343345        }
    344 
     346       
    345347        child = ddf_fun_create(parent, fun_inner, child_name);
    346348        if (child == NULL) {
     
    348350                goto failure;
    349351        }
    350 
    351         if (dev_ops != NULL) {
     352       
     353        if (dev_ops != NULL)
    352354                child->ops = dev_ops;
    353         } else {
     355        else
    354356                child->ops = &child_ops;
    355         }
    356 
     357       
    357358        child->driver_data = dev_data;
    358         /* Store the attached device in fun driver data if there is no
    359          * other data */
     359        /*
     360         * Store the attached device in fun
     361         * driver data if there is no other data
     362         */
    360363        if (!dev_data) {
    361364                usb_hub_attached_device_t *new_device = ddf_fun_data_alloc(
     
    365368                        goto failure;
    366369                }
     370               
    367371                new_device->address = ctrl_pipe->wire->address;
    368372                new_device->fun = child;
    369373        }
    370 
    371 
     374       
    372375        rc = usb_device_create_match_ids(ctrl_pipe, &child->match_ids);
    373         if (rc != EOK) {
     376        if (rc != EOK)
    374377                goto failure;
    375         }
    376 
     378       
    377379        rc = ddf_fun_bind(child);
    378         if (rc != EOK) {
     380        if (rc != EOK)
    379381                goto failure;
    380         }
    381 
     382       
    382383        *child_fun = child;
    383384        return EOK;
    384 
     385       
    385386failure:
    386387        if (child != NULL) {
    387388                /* We know nothing about the data if it came from outside. */
    388                 if (dev_data) {
     389                if (dev_data)
    389390                        child->driver_data = NULL;
    390                 }
     391               
    391392                /* This takes care of match_id deallocation as well. */
    392393                ddf_fun_destroy(child);
    393394        }
    394 
     395       
    395396        return rc;
    396397}
    397398
    398 
    399399/**
    400400 * @}
  • uspace/lib/usbhid/src/hidiface.c

    r4e5dabf r77ad86c  
    3333 * Client functions for accessing USB HID interface (implementation).
    3434 */
     35
    3536#include <dev_iface.h>
    3637#include <usbhid_iface.h>
  • uspace/lib/usbhost/include/usb/host/hcd.h

    r4e5dabf r77ad86c  
    3333 *
    3434 */
     35
    3536#ifndef LIBUSBHOST_HOST_HCD_H
    3637#define LIBUSBHOST_HOST_HCD_H
     
    6162        void (*ep_remove_hook)(hcd_t *, endpoint_t *);
    6263};
    63 /*----------------------------------------------------------------------------*/
     64
    6465/** Initialize hcd_t structure.
    6566 * Initializes device and endpoint managers. Sets data and hook pointer to NULL.
     
    7980        hcd->ep_remove_hook = NULL;
    8081}
    81 /*----------------------------------------------------------------------------*/
     82
    8283/** Check registered endpoints and reset toggle bit if necessary.
    8384 * @param hcd hcd_t structure, non-null.
     
    9293            &hcd->ep_manager, target, (const uint8_t *)setup_data);
    9394}
    94 /*----------------------------------------------------------------------------*/
     95
    9596/** Data retrieve wrapper.
    9697 * @param fun ddf function, non-null.
     
    102103        return fun->driver_data;
    103104}
    104 /*----------------------------------------------------------------------------*/
     105
    105106extern usbhc_iface_t hcd_iface;
    106107
    107108#endif
     109
    108110/**
    109111 * @}
  • uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h

    r4e5dabf r77ad86c  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup libusbhost
    2930 * @{
     
    3233 * USB transfer transaction structures.
    3334 */
     35
    3436#ifndef LIBUSBHOST_HOST_USB_TRANSFER_BATCH_H
    3537#define LIBUSBHOST_HOST_USB_TRANSFER_BATCH_H
     
    115117void usb_transfer_batch_finish_error(const usb_transfer_batch_t *instance,
    116118    const void* data, size_t size, int error);
    117 /*----------------------------------------------------------------------------*/
     119
    118120/** Finish batch using stored error value and transferred size.
    119121 *
     
    128130            instance, data, instance->transfered_size, instance->error);
    129131}
    130 /*----------------------------------------------------------------------------*/
     132
    131133/** Determine batch direction based on the callbacks present
    132134 * @param[in] instance Batch structure to use, non-null.
     
    153155        assert(false);
    154156}
     157
    155158#endif
     159
    156160/**
    157161 * @}
  • uspace/lib/usbhost/src/iface.c

    r4e5dabf r77ad86c  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup libusbhost
    2930 * @{
     
    3233 * @brief HCD DDF interface implementation
    3334 */
     35
    3436#include <ddf/driver.h>
    3537#include <errno.h>
     
    98100        return ret;
    99101}
    100 /*----------------------------------------------------------------------------*/
     102
    101103/** Calls ep_add_hook upon endpoint registration.
    102104 * @param ep Endpoint to be registered.
     
    113115        return EOK;
    114116}
    115 /*----------------------------------------------------------------------------*/
     117
    116118/** Calls ep_remove_hook upon endpoint removal.
    117119 * @param ep Endpoint to be unregistered.
     
    126128                hcd->ep_remove_hook(hcd, ep);
    127129}
    128 /*----------------------------------------------------------------------------*/
     130
    129131/** Calls ep_remove_hook upon endpoint removal. Prints warning.
    130132 * @param ep Endpoint to be unregistered.
     
    141143                hcd->ep_remove_hook(hcd, ep);
    142144}
    143 /*----------------------------------------------------------------------------*/
     145
    144146/** Request address interface function.
    145147 *
     
    164166            &hcd->dev_manager, address, strict, speed);
    165167}
    166 /*----------------------------------------------------------------------------*/
     168
    167169/** Bind address interface function.
    168170 *
     
    183185            &hcd->dev_manager, address, handle);
    184186}
    185 /*----------------------------------------------------------------------------*/
     187
    186188/** Find device handle by address interface function.
    187189 *
     
    200202            &hcd->dev_manager, address, handle, NULL);
    201203}
    202 /*----------------------------------------------------------------------------*/
     204
    203205/** Release address interface function.
    204206 *
     
    218220        return EOK;
    219221}
    220 /*----------------------------------------------------------------------------*/
     222
    221223/** Register endpoint interface function.
    222224 * @param fun DDF function.
     
    254256            register_helper, hcd);
    255257}
    256 /*----------------------------------------------------------------------------*/
     258
    257259/** Unregister endpoint interface function.
    258260 * @param fun DDF function.
     
    274276            endpoint, direction, unregister_helper, hcd);
    275277}
    276 /*----------------------------------------------------------------------------*/
     278
    277279/** Inbound communication interface function.
    278280 * @param fun DDF function.
     
    292294            setup_data, callback, NULL, arg, "READ");
    293295}
    294 /*----------------------------------------------------------------------------*/
     296
    295297/** Outbound communication interface function.
    296298 * @param fun DDF function.
     
    310312            setup_data, NULL, callback, arg, "WRITE");
    311313}
    312 /*----------------------------------------------------------------------------*/
     314
    313315/** usbhc Interface implementation using hcd_t from libusbhost library. */
    314316usbhc_iface_t hcd_iface = {
     
    324326        .write = usb_write,
    325327};
     328
    326329/**
    327330 * @}
  • uspace/lib/usbvirt/src/device.c

    r4e5dabf r77ad86c  
    3333 * Virtual USB device main routines.
    3434 */
     35
    3536#include <errno.h>
    3637#include <str.h>
Note: See TracChangeset for help on using the changeset viewer.