Changeset 77ad86c in mainline for uspace/lib/usb


Ignore:
Timestamp:
2012-06-01T19:00:32Z (13 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/usb
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.