Changeset 3954a63b in mainline


Ignore:
Timestamp:
2011-03-21T14:10:41Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
68b5ed6e
Parents:
a372663
Message:

Rename usb_endpoint_pipe_*() ⇒ usb_pipe_*()

No change in functionality.

Location:
uspace
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/dev.c

    ra372663 r3954a63b  
    5959        }
    6060
    61         rc = usb_endpoint_pipe_initialize_default_control(&dev->ctrl_pipe,
     61        rc = usb_pipe_initialize_default_control(&dev->ctrl_pipe,
    6262            &dev->wire);
    6363        if (rc != EOK) {
     
    6868        }
    6969
    70         rc = usb_endpoint_pipe_probe_default_control(&dev->ctrl_pipe);
     70        rc = usb_pipe_probe_default_control(&dev->ctrl_pipe);
    7171        if (rc != EOK) {
    7272                fprintf(stderr,
     
    7676        }
    7777
    78         rc = usb_endpoint_pipe_start_session(&dev->ctrl_pipe);
     78        rc = usb_pipe_start_session(&dev->ctrl_pipe);
    7979        if (rc != EOK) {
    8080                fprintf(stderr,
     
    107107
    108108leave:
    109         if (usb_endpoint_pipe_is_session_started(&dev->ctrl_pipe)) {
    110                 usb_endpoint_pipe_end_session(&dev->ctrl_pipe);
     109        if (usb_pipe_is_session_started(&dev->ctrl_pipe)) {
     110                usb_pipe_end_session(&dev->ctrl_pipe);
    111111        }
    112112
     
    118118void destroy_device(usbinfo_device_t *dev)
    119119{
    120         usb_endpoint_pipe_end_session(&dev->ctrl_pipe);
     120        usb_pipe_end_session(&dev->ctrl_pipe);
    121121        free(dev);
    122122}
  • uspace/drv/usbhid/hiddev.c

    ra372663 r3954a63b  
    184184 *                     successfuly initialize the structure.
    185185 *
    186  * @sa usb_endpoint_pipe_initialize_from_configuration(),
     186 * @sa usb_pipe_initialize_from_configuration(),
    187187 *     usbhid_dev_get_report_descriptor()
    188188 */
     
    218218        };
    219219       
    220         rc = usb_endpoint_pipe_initialize_from_configuration(
     220        rc = usb_pipe_initialize_from_configuration(
    221221            endpoint_mapping, 1, descriptors, descriptors_size,
    222222            &hid_dev->wire);
     
    359359 * @return Other value inherited from one of functions
    360360 *         usb_device_connection_initialize_from_device(),
    361  *         usb_endpoint_pipe_initialize_default_control(),
    362  *         usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(),
     361 *         usb_pipe_initialize_default_control(),
     362 *         usb_pipe_start_session(), usb_pipe_end_session(),
    363363 *         usbhid_dev_process_descriptors().
    364364 *
     
    404404         * Initialize device pipes.
    405405         */
    406         rc = usb_endpoint_pipe_initialize_default_control(&hid_dev->ctrl_pipe,
     406        rc = usb_pipe_initialize_default_control(&hid_dev->ctrl_pipe,
    407407            &hid_dev->wire);
    408408        if (rc != EOK) {
     
    411411                return rc;
    412412        }
    413         rc = usb_endpoint_pipe_probe_default_control(&hid_dev->ctrl_pipe);
     413        rc = usb_pipe_probe_default_control(&hid_dev->ctrl_pipe);
    414414        if (rc != EOK) {
    415415                usb_log_error("Probing default control pipe failed: %s.\n",
     
    430430         * Get descriptors, parse descriptors and save endpoints.
    431431         */
    432         rc = usb_endpoint_pipe_start_session(&hid_dev->ctrl_pipe);
     432        rc = usb_pipe_start_session(&hid_dev->ctrl_pipe);
    433433        if (rc != EOK) {
    434434                usb_log_error("Failed to start session on the control pipe: %s"
     
    440440        if (rc != EOK) {
    441441                /* TODO: end session?? */
    442                 usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     442                usb_pipe_end_session(&hid_dev->ctrl_pipe);
    443443                usb_log_error("Failed to process descriptors: %s.\n",
    444444                    str_error(rc));
     
    446446        }
    447447       
    448         rc = usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     448        rc = usb_pipe_end_session(&hid_dev->ctrl_pipe);
    449449        if (rc != EOK) {
    450450                usb_log_warning("Failed to start session on the control pipe: "
  • uspace/drv/usbhid/hidreq.c

    ra372663 r3954a63b  
    5757 * @retval EINVAL if no HID device is given.
    5858 * @return Other value inherited from one of functions
    59  *         usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(),
     59 *         usb_pipe_start_session(), usb_pipe_end_session(),
    6060 *         usb_control_request_set().
    6161 */
     
    7676        int rc, sess_rc;
    7777       
    78         sess_rc = usb_endpoint_pipe_start_session(&hid_dev->ctrl_pipe);
     78        sess_rc = usb_pipe_start_session(&hid_dev->ctrl_pipe);
    7979        if (sess_rc != EOK) {
    8080                usb_log_warning("Failed to start a session: %s.\n",
     
    9292            USB_HIDREQ_SET_REPORT, value, hid_dev->iface, buffer, buf_size);
    9393
    94         sess_rc = usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     94        sess_rc = usb_pipe_end_session(&hid_dev->ctrl_pipe);
    9595
    9696        if (rc != EOK) {
     
    119119 * @retval EINVAL if no HID device is given.
    120120 * @return Other value inherited from one of functions
    121  *         usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(),
     121 *         usb_pipe_start_session(), usb_pipe_end_session(),
    122122 *         usb_control_request_set().
    123123 */
     
    137137        int rc, sess_rc;
    138138       
    139         sess_rc = usb_endpoint_pipe_start_session(&hid_dev->ctrl_pipe);
     139        sess_rc = usb_pipe_start_session(&hid_dev->ctrl_pipe);
    140140        if (sess_rc != EOK) {
    141141                usb_log_warning("Failed to start a session: %s.\n",
     
    151151            USB_HIDREQ_SET_PROTOCOL, protocol, hid_dev->iface, NULL, 0);
    152152
    153         sess_rc = usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     153        sess_rc = usb_pipe_end_session(&hid_dev->ctrl_pipe);
    154154
    155155        if (rc != EOK) {
     
    179179 * @retval EINVAL if no HID device is given.
    180180 * @return Other value inherited from one of functions
    181  *         usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(),
     181 *         usb_pipe_start_session(), usb_pipe_end_session(),
    182182 *         usb_control_request_set().
    183183 */
     
    197197        int rc, sess_rc;
    198198       
    199         sess_rc = usb_endpoint_pipe_start_session(&hid_dev->ctrl_pipe);
     199        sess_rc = usb_pipe_start_session(&hid_dev->ctrl_pipe);
    200200        if (sess_rc != EOK) {
    201201                usb_log_warning("Failed to start a session: %s.\n",
     
    213213            USB_HIDREQ_SET_IDLE, value, hid_dev->iface, NULL, 0);
    214214
    215         sess_rc = usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     215        sess_rc = usb_pipe_end_session(&hid_dev->ctrl_pipe);
    216216
    217217        if (rc != EOK) {
     
    244244 * @retval EINVAL if no HID device is given.
    245245 * @return Other value inherited from one of functions
    246  *         usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(),
     246 *         usb_pipe_start_session(), usb_pipe_end_session(),
    247247 *         usb_control_request_set().
    248248 */
     
    263263        int rc, sess_rc;
    264264       
    265         sess_rc = usb_endpoint_pipe_start_session(&hid_dev->ctrl_pipe);
     265        sess_rc = usb_pipe_start_session(&hid_dev->ctrl_pipe);
    266266        if (sess_rc != EOK) {
    267267                usb_log_warning("Failed to start a session: %s.\n",
     
    280280            actual_size);
    281281
    282         sess_rc = usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     282        sess_rc = usb_pipe_end_session(&hid_dev->ctrl_pipe);
    283283
    284284        if (rc != EOK) {
     
    307307 * @retval EINVAL if no HID device is given.
    308308 * @return Other value inherited from one of functions
    309  *         usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(),
     309 *         usb_pipe_start_session(), usb_pipe_end_session(),
    310310 *         usb_control_request_set().
    311311 */
     
    325325        int rc, sess_rc;
    326326       
    327         sess_rc = usb_endpoint_pipe_start_session(&hid_dev->ctrl_pipe);
     327        sess_rc = usb_pipe_start_session(&hid_dev->ctrl_pipe);
    328328        if (sess_rc != EOK) {
    329329                usb_log_warning("Failed to start a session: %s.\n",
     
    342342            USB_HIDREQ_GET_PROTOCOL, 0, hid_dev->iface, buffer, 1, &actual_size);
    343343
    344         sess_rc = usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     344        sess_rc = usb_pipe_end_session(&hid_dev->ctrl_pipe);
    345345
    346346        if (rc != EOK) {
     
    378378 * @retval EINVAL if no HID device is given.
    379379 * @return Other value inherited from one of functions
    380  *         usb_endpoint_pipe_start_session(), usb_endpoint_pipe_end_session(),
     380 *         usb_pipe_start_session(), usb_pipe_end_session(),
    381381 *         usb_control_request_set().
    382382 */
     
    396396        int rc, sess_rc;
    397397       
    398         sess_rc = usb_endpoint_pipe_start_session(&hid_dev->ctrl_pipe);
     398        sess_rc = usb_pipe_start_session(&hid_dev->ctrl_pipe);
    399399        if (sess_rc != EOK) {
    400400                usb_log_warning("Failed to start a session: %s.\n",
     
    415415            &actual_size);
    416416
    417         sess_rc = usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);
     417        sess_rc = usb_pipe_end_session(&hid_dev->ctrl_pipe);
    418418
    419419        if (rc != EOK) {
  • uspace/drv/usbhid/kbddev.c

    ra372663 r3954a63b  
    780780
    781781        while (true) {
    782                 sess_rc = usb_endpoint_pipe_start_session(
     782                sess_rc = usb_pipe_start_session(
    783783                    &kbd_dev->hid_dev->poll_pipe);
    784784                if (sess_rc != EOK) {
     
    788788                }
    789789
    790                 rc = usb_endpoint_pipe_read(&kbd_dev->hid_dev->poll_pipe,
     790                rc = usb_pipe_read(&kbd_dev->hid_dev->poll_pipe,
    791791                    buffer, BOOTP_BUFFER_SIZE, &actual_size);
    792792               
    793                 sess_rc = usb_endpoint_pipe_end_session(
     793                sess_rc = usb_pipe_end_session(
    794794                    &kbd_dev->hid_dev->poll_pipe);
    795795
  • uspace/drv/usbhub/usbhub.c

    ra372663 r3954a63b  
    224224        }
    225225       
    226         usb_endpoint_pipe_start_session(hub_info->control_pipe);
     226        usb_pipe_start_session(hub_info->control_pipe);
    227227        //set hub configuration
    228228        opResult = usb_hub_set_configuration(hub_info);
     
    239239                return opResult;
    240240        }
    241         usb_endpoint_pipe_end_session(hub_info->control_pipe);
     241        usb_pipe_end_session(hub_info->control_pipe);
    242242
    243243
     
    321321        //reset port
    322322        usb_hub_set_reset_port_request(&request, port);
    323         opResult = usb_endpoint_pipe_control_write(
     323        opResult = usb_pipe_control_write(
    324324                        hub->control_pipe,
    325325                        &request,sizeof(usb_device_request_setup_packet_t),
     
    360360                        &hub->connection
    361361                        );
    362         usb_endpoint_pipe_initialize_default_control(
     362        usb_pipe_initialize_default_control(
    363363                        &new_device_pipe,
    364364                        &new_device_connection);
    365         usb_endpoint_pipe_probe_default_control(&new_device_pipe);
     365        usb_pipe_probe_default_control(&new_device_pipe);
    366366
    367367        /* Request address from host controller. */
     
    379379        //opResult = usb_drv_req_set_address(hc, USB_ADDRESS_DEFAULT,
    380380        //    new_device_address);
    381         usb_endpoint_pipe_start_session(&new_device_pipe);
     381        usb_pipe_start_session(&new_device_pipe);
    382382        opResult = usb_request_set_address(&new_device_pipe,new_device_address);
    383         usb_endpoint_pipe_end_session(&new_device_pipe);
     383        usb_pipe_end_session(&new_device_pipe);
    384384        if (opResult != EOK) {
    385385                usb_log_error("could not set address for new device %d\n",opResult);
     
    499499        //endpoint 0
    500500
    501         opResult = usb_endpoint_pipe_control_read(
     501        opResult = usb_pipe_control_read(
    502502                        pipe,
    503503                        &request, sizeof(usb_device_request_setup_packet_t),
     
    560560int usb_hub_check_hub_changes(usb_hub_info_t * hub_info){
    561561        int opResult;
    562         opResult = usb_endpoint_pipe_start_session(
     562        opResult = usb_pipe_start_session(
    563563                        hub_info->status_change_pipe);
    564564        if(opResult != EOK){
     
    578578         * Send the request.
    579579         */
    580         opResult = usb_endpoint_pipe_read(
     580        opResult = usb_pipe_read(
    581581                        hub_info->status_change_pipe,
    582582                        change_bitmap, byte_length, &actual_size
     
    586586                free(change_bitmap);
    587587                usb_log_warning("something went wrong while getting status of hub\n");
    588                 usb_endpoint_pipe_end_session(hub_info->status_change_pipe);
     588                usb_pipe_end_session(hub_info->status_change_pipe);
    589589                return opResult;
    590590        }
    591591        unsigned int port;
    592         opResult = usb_endpoint_pipe_start_session(hub_info->control_pipe);
     592        opResult = usb_pipe_start_session(hub_info->control_pipe);
    593593        if(opResult!=EOK){
    594594                usb_log_error("could not start control pipe session %d\n", opResult);
    595                 usb_endpoint_pipe_end_session(hub_info->status_change_pipe);
     595                usb_pipe_end_session(hub_info->status_change_pipe);
    596596                return opResult;
    597597        }
     
    600600                usb_log_error("could not start host controller session %d\n",
    601601                                opResult);
    602                 usb_endpoint_pipe_end_session(hub_info->control_pipe);
    603                 usb_endpoint_pipe_end_session(hub_info->status_change_pipe);
     602                usb_pipe_end_session(hub_info->control_pipe);
     603                usb_pipe_end_session(hub_info->status_change_pipe);
    604604                return opResult;
    605605        }
     
    615615        }
    616616        usb_hc_connection_close(&hub_info->connection);
    617         usb_endpoint_pipe_end_session(hub_info->control_pipe);
    618         usb_endpoint_pipe_end_session(hub_info->status_change_pipe);
     617        usb_pipe_end_session(hub_info->control_pipe);
     618        usb_pipe_end_session(hub_info->status_change_pipe);
    619619        free(change_bitmap);
    620620        return EOK;
  • uspace/drv/usbhub/usbhub_private.h

    ra372663 r3954a63b  
    106106        };
    107107        clear_request.value = feature;
    108         return usb_endpoint_pipe_control_write(pipe, &clear_request,
     108        return usb_pipe_control_write(pipe, &clear_request,
    109109            sizeof(clear_request), NULL, 0);
    110110}
  • uspace/drv/usbmid/main.c

    ra372663 r3954a63b  
    6161        int rc;
    6262
    63         rc = usb_endpoint_pipe_start_session(&dev->ctrl_pipe);
     63        rc = usb_pipe_start_session(&dev->ctrl_pipe);
    6464        if (rc != EOK) {
    6565                usb_log_error("Failed to start session on control pipe: %s.\n",
     
    7070        bool accept = usbmid_explore_device(dev);
    7171
    72         rc = usb_endpoint_pipe_end_session(&dev->ctrl_pipe);
     72        rc = usb_pipe_end_session(&dev->ctrl_pipe);
    7373        if (rc != EOK) {
    7474                usb_log_warning("Failed to end session on control pipe: %s.\n",
  • uspace/drv/usbmid/usbmid.c

    ra372663 r3954a63b  
    108108        }
    109109
    110         rc = usb_endpoint_pipe_initialize_default_control(&mid->ctrl_pipe,
     110        rc = usb_pipe_initialize_default_control(&mid->ctrl_pipe,
    111111            &mid->wire);
    112112        if (rc != EOK) {
     
    116116                return NULL;
    117117        }
    118         rc = usb_endpoint_pipe_probe_default_control(&mid->ctrl_pipe);
     118        rc = usb_pipe_probe_default_control(&mid->ctrl_pipe);
    119119        if (rc != EOK) {
    120120                usb_log_error("Probing default control pipe failed: %s.\n",
  • uspace/drv/usbmouse/init.c

    ra372663 r3954a63b  
    126126       
    127127        /* Open the control pipe. */
    128         rc = usb_endpoint_pipe_start_session(&dev->ctrl_pipe);
     128        rc = usb_pipe_start_session(&dev->ctrl_pipe);
    129129        if (rc != EOK) {
    130130                goto leave;
     
    141141       
    142142        /* Close the control pipe (ignore errors). */
    143         usb_endpoint_pipe_end_session(&dev->ctrl_pipe);
     143        usb_pipe_end_session(&dev->ctrl_pipe);
    144144
    145145
  • uspace/lib/usb/include/usb/pipes.h

    ra372663 r3954a63b  
    125125usb_address_t usb_device_get_assigned_address(devman_handle_t);
    126126
    127 int usb_endpoint_pipe_initialize(usb_pipe_t *,
    128     usb_device_connection_t *,
     127int usb_pipe_initialize(usb_pipe_t *, usb_device_connection_t *,
    129128    usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t);
    130 int usb_endpoint_pipe_initialize_default_control(usb_pipe_t *,
     129int usb_pipe_initialize_default_control(usb_pipe_t *,
    131130    usb_device_connection_t *);
    132 int usb_endpoint_pipe_probe_default_control(usb_pipe_t *);
    133 int usb_endpoint_pipe_initialize_from_configuration(usb_endpoint_mapping_t *,
     131int usb_pipe_probe_default_control(usb_pipe_t *);
     132int usb_pipe_initialize_from_configuration(usb_endpoint_mapping_t *,
    134133    size_t, uint8_t *, size_t, usb_device_connection_t *);
    135 int usb_endpoint_pipe_register(usb_pipe_t *, unsigned int,
    136     usb_hc_connection_t *);
    137 int usb_endpoint_pipe_unregister(usb_pipe_t *, usb_hc_connection_t *);
     134int usb_pipe_register(usb_pipe_t *, unsigned int, usb_hc_connection_t *);
     135int usb_pipe_unregister(usb_pipe_t *, usb_hc_connection_t *);
    138136
    139 int usb_endpoint_pipe_start_session(usb_pipe_t *);
    140 int usb_endpoint_pipe_end_session(usb_pipe_t *);
    141 bool usb_endpoint_pipe_is_session_started(usb_pipe_t *);
     137int usb_pipe_start_session(usb_pipe_t *);
     138int usb_pipe_end_session(usb_pipe_t *);
     139bool usb_pipe_is_session_started(usb_pipe_t *);
    142140
    143 int usb_endpoint_pipe_read(usb_pipe_t *, void *, size_t, size_t *);
    144 int usb_endpoint_pipe_write(usb_pipe_t *, void *, size_t);
     141int usb_pipe_read(usb_pipe_t *, void *, size_t, size_t *);
     142int usb_pipe_write(usb_pipe_t *, void *, size_t);
    145143
    146 int usb_endpoint_pipe_control_read(usb_pipe_t *, void *, size_t,
     144int usb_pipe_control_read(usb_pipe_t *, void *, size_t,
    147145    void *, size_t, size_t *);
    148 int usb_endpoint_pipe_control_write(usb_pipe_t *, void *, size_t,
     146int usb_pipe_control_write(usb_pipe_t *, void *, size_t,
    149147    void *, size_t);
    150148
  • uspace/lib/usb/src/devdrv.c

    ra372663 r3954a63b  
    147147        }
    148148
    149         rc = usb_endpoint_pipe_initialize_from_configuration(dev->pipes,
     149        rc = usb_pipe_initialize_from_configuration(dev->pipes,
    150150           pipe_count, config_descriptor, config_descriptor_size, &dev->wire);
    151151        if (rc != EOK) {
     
    172172        for (i = 0; i < pipe_count; i++) {
    173173                if (dev->pipes[i].present) {
    174                         rc = usb_endpoint_pipe_register(dev->pipes[i].pipe,
     174                        rc = usb_pipe_register(dev->pipes[i].pipe,
    175175                            dev->pipes[i].descriptor->poll_interval,
    176176                            &hc_conn);
     
    219219        }
    220220
    221         rc = usb_endpoint_pipe_initialize_default_control(&dev->ctrl_pipe,
     221        rc = usb_pipe_initialize_default_control(&dev->ctrl_pipe,
    222222            &dev->wire);
    223223        if (rc != EOK) {
     
    228228        }
    229229
    230         rc = usb_endpoint_pipe_probe_default_control(&dev->ctrl_pipe);
     230        rc = usb_pipe_probe_default_control(&dev->ctrl_pipe);
    231231        if (rc != EOK) {
    232232                usb_log_error(
     
    240240         * default control pipe.
    241241         */
    242         rc = usb_endpoint_pipe_start_session(&dev->ctrl_pipe);
     242        rc = usb_pipe_start_session(&dev->ctrl_pipe);
    243243        if (rc != EOK) {
    244244                usb_log_error("Failed to start an IPC session: %s.\n",
     
    252252
    253253        /* No checking here. */
    254         usb_endpoint_pipe_end_session(&dev->ctrl_pipe);
     254        usb_pipe_end_session(&dev->ctrl_pipe);
    255255
    256256        return rc;
  • uspace/lib/usb/src/devpoll.c

    ra372663 r3954a63b  
    7171                int rc;
    7272
    73                 rc = usb_endpoint_pipe_start_session(pipe);
     73                rc = usb_pipe_start_session(pipe);
    7474                if (rc != EOK) {
    7575                        failed_attempts++;
     
    7878
    7979                size_t actual_size;
    80                 rc = usb_endpoint_pipe_read(pipe, polling_data->buffer,
     80                rc = usb_pipe_read(pipe, polling_data->buffer,
    8181                    polling_data->request_size, &actual_size);
    8282
    8383                /* Quit the session regardless of errors. */
    84                 usb_endpoint_pipe_end_session(pipe);
     84                usb_pipe_end_session(pipe);
    8585
    8686                if (rc != EOK) {
  • uspace/lib/usb/src/hub.c

    ra372663 r3954a63b  
    229229
    230230        usb_pipe_t ctrl_pipe;
    231         rc = usb_endpoint_pipe_initialize_default_control(&ctrl_pipe,
     231        rc = usb_pipe_initialize_default_control(&ctrl_pipe,
    232232            &dev_conn);
    233233        if (rc != EOK) {
     
    235235                goto leave_release_default_address;
    236236        }
    237         rc = usb_endpoint_pipe_probe_default_control(&ctrl_pipe);
     237        rc = usb_pipe_probe_default_control(&ctrl_pipe);
    238238        if (rc != EOK) {
    239239                rc = ENOTCONN;
     
    241241        }
    242242
    243         rc = usb_endpoint_pipe_start_session(&ctrl_pipe);
     243        rc = usb_pipe_start_session(&ctrl_pipe);
    244244        if (rc != EOK) {
    245245                rc = ENOTCONN;
     
    253253        }
    254254
    255         usb_endpoint_pipe_end_session(&ctrl_pipe);
     255        usb_pipe_end_session(&ctrl_pipe);
    256256
    257257        /*
     
    306306
    307307leave_stop_session:
    308         usb_endpoint_pipe_end_session(&ctrl_pipe);
     308        usb_pipe_end_session(&ctrl_pipe);
    309309
    310310leave_release_default_address:
  • uspace/lib/usb/src/pipes.c

    ra372663 r3954a63b  
    233233 * A session is something inside what any communication occurs.
    234234 * It is expected that sessions would be started right before the transfer
    235  * and ended - see usb_endpoint_pipe_end_session() - after the last
     235 * and ended - see usb_pipe_end_session() - after the last
    236236 * transfer.
    237237 * The reason for this is that session actually opens some communication
     
    244244 * @return Error code.
    245245 */
    246 int usb_endpoint_pipe_start_session(usb_pipe_t *pipe)
     246int usb_pipe_start_session(usb_pipe_t *pipe)
    247247{
    248248        assert(pipe);
    249249
    250         if (usb_endpoint_pipe_is_session_started(pipe)) {
     250        if (usb_pipe_is_session_started(pipe)) {
    251251                return EBUSY;
    252252        }
     
    265265/** Ends a session on the endpoint pipe.
    266266 *
    267  * @see usb_endpoint_pipe_start_session
     267 * @see usb_pipe_start_session
    268268 *
    269269 * @param pipe Endpoint pipe to end the session on.
    270270 * @return Error code.
    271271 */
    272 int usb_endpoint_pipe_end_session(usb_pipe_t *pipe)
     272int usb_pipe_end_session(usb_pipe_t *pipe)
    273273{
    274274        assert(pipe);
    275275
    276         if (!usb_endpoint_pipe_is_session_started(pipe)) {
     276        if (!usb_pipe_is_session_started(pipe)) {
    277277                return ENOENT;
    278278        }
     
    296296 * @return Whether @p pipe has opened a session.
    297297 */
    298 bool usb_endpoint_pipe_is_session_started(usb_pipe_t *pipe)
     298bool usb_pipe_is_session_started(usb_pipe_t *pipe)
    299299{
    300300        return (pipe->hc_phone >= 0);
  • uspace/lib/usb/src/pipesinit.c

    ra372663 r3954a63b  
    193193        }
    194194
    195         int rc = usb_endpoint_pipe_initialize(ep_mapping->pipe, wire,
     195        int rc = usb_pipe_initialize(ep_mapping->pipe, wire,
    196196            ep_no, description.transfer_type, endpoint->max_packet_size,
    197197            description.direction);
     
    276276 * @return Error code.
    277277 */
    278 int usb_endpoint_pipe_initialize_from_configuration(
     278int usb_pipe_initialize_from_configuration(
    279279    usb_endpoint_mapping_t *mapping, size_t mapping_count,
    280280    uint8_t *configuration_descriptor, size_t configuration_descriptor_size,
     
    342342 * @return Error code.
    343343 */
    344 int usb_endpoint_pipe_initialize(usb_pipe_t *pipe,
     344int usb_pipe_initialize(usb_pipe_t *pipe,
    345345    usb_device_connection_t *connection, usb_endpoint_t endpoint_no,
    346346    usb_transfer_type_t transfer_type, size_t max_packet_size,
     
    367367 * @return Error code.
    368368 */
    369 int usb_endpoint_pipe_initialize_default_control(usb_pipe_t *pipe,
     369int usb_pipe_initialize_default_control(usb_pipe_t *pipe,
    370370    usb_device_connection_t *connection)
    371371{
     
    373373        assert(connection);
    374374
    375         int rc = usb_endpoint_pipe_initialize(pipe, connection,
     375        int rc = usb_pipe_initialize(pipe, connection,
    376376            0, USB_TRANSFER_CONTROL, CTRL_PIPE_MIN_PACKET_SIZE,
    377377            USB_DIRECTION_BOTH);
     
    390390 * @return Error code.
    391391 */
    392 int usb_endpoint_pipe_probe_default_control(usb_pipe_t *pipe)
     392int usb_pipe_probe_default_control(usb_pipe_t *pipe)
    393393{
    394394        assert(pipe);
     
    408408
    409409        TRY_LOOP(failed_attempts) {
    410                 rc = usb_endpoint_pipe_start_session(pipe);
     410                rc = usb_pipe_start_session(pipe);
    411411                if (rc == EOK) {
    412412                        break;
     
    433433                }
    434434        }
    435         usb_endpoint_pipe_end_session(pipe);
     435        usb_pipe_end_session(pipe);
    436436        if (rc != EOK) {
    437437                return rc;
     
    451451 * @return Error code.
    452452 */
    453 int usb_endpoint_pipe_register(usb_pipe_t *pipe,
     453int usb_pipe_register(usb_pipe_t *pipe,
    454454    unsigned int interval,
    455455    usb_hc_connection_t *hc_connection)
     
    479479 * @return Error code.
    480480 */
    481 int usb_endpoint_pipe_unregister(usb_pipe_t *pipe,
     481int usb_pipe_unregister(usb_pipe_t *pipe,
    482482    usb_hc_connection_t *hc_connection)
    483483{
  • uspace/lib/usb/src/pipesio.c

    ra372663 r3954a63b  
    5858 * @return Error code.
    5959 */
    60 static int usb_endpoint_pipe_read_no_checks(usb_pipe_t *pipe,
     60static int usb_pipe_read_no_checks(usb_pipe_t *pipe,
    6161    void *buffer, size_t size, size_t *size_transfered)
    6262{
     
    140140 * @return Error code.
    141141 */
    142 int usb_endpoint_pipe_read(usb_pipe_t *pipe,
     142int usb_pipe_read(usb_pipe_t *pipe,
    143143    void *buffer, size_t size, size_t *size_transfered)
    144144{
     
    153153        }
    154154
    155         if (!usb_endpoint_pipe_is_session_started(pipe)) {
     155        if (!usb_pipe_is_session_started(pipe)) {
    156156                return EBADF;
    157157        }
     
    168168        int rc;
    169169
    170         rc = usb_endpoint_pipe_read_no_checks(pipe, buffer, size, &act_size);
     170        rc = usb_pipe_read_no_checks(pipe, buffer, size, &act_size);
    171171        if (rc != EOK) {
    172172                return rc;
     
    190190 * @return Error code.
    191191 */
    192 static int usb_endpoint_pipe_write_no_check(usb_pipe_t *pipe,
     192static int usb_pipe_write_no_check(usb_pipe_t *pipe,
    193193    void *buffer, size_t size)
    194194{
     
    247247 * @return Error code.
    248248 */
    249 int usb_endpoint_pipe_write(usb_pipe_t *pipe,
     249int usb_pipe_write(usb_pipe_t *pipe,
    250250    void *buffer, size_t size)
    251251{
     
    260260        }
    261261
    262         if (!usb_endpoint_pipe_is_session_started(pipe)) {
     262        if (!usb_pipe_is_session_started(pipe)) {
    263263                return EBADF;
    264264        }
     
    272272        }
    273273
    274         int rc = usb_endpoint_pipe_write_no_check(pipe, buffer, size);
     274        int rc = usb_pipe_write_no_check(pipe, buffer, size);
    275275
    276276        return rc;
     
    289289 * @return Error code.
    290290 */
    291 static int usb_endpoint_pipe_control_read_no_check(usb_pipe_t *pipe,
     291static int usb_pipe_control_read_no_check(usb_pipe_t *pipe,
    292292    void *setup_buffer, size_t setup_buffer_size,
    293293    void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size)
     
    365365 * @return Error code.
    366366 */
    367 int usb_endpoint_pipe_control_read(usb_pipe_t *pipe,
     367int usb_pipe_control_read(usb_pipe_t *pipe,
    368368    void *setup_buffer, size_t setup_buffer_size,
    369369    void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size)
     
    379379        }
    380380
    381         if (!usb_endpoint_pipe_is_session_started(pipe)) {
     381        if (!usb_pipe_is_session_started(pipe)) {
    382382                return EBADF;
    383383        }
     
    389389
    390390        size_t act_size = 0;
    391         int rc = usb_endpoint_pipe_control_read_no_check(pipe,
     391        int rc = usb_pipe_control_read_no_check(pipe,
    392392            setup_buffer, setup_buffer_size,
    393393            data_buffer, data_buffer_size, &act_size);
     
    414414 * @return Error code.
    415415 */
    416 static int usb_endpoint_pipe_control_write_no_check(usb_pipe_t *pipe,
     416static int usb_pipe_control_write_no_check(usb_pipe_t *pipe,
    417417    void *setup_buffer, size_t setup_buffer_size,
    418418    void *data_buffer, size_t data_buffer_size)
     
    473473 * @return Error code.
    474474 */
    475 int usb_endpoint_pipe_control_write(usb_pipe_t *pipe,
     475int usb_pipe_control_write(usb_pipe_t *pipe,
    476476    void *setup_buffer, size_t setup_buffer_size,
    477477    void *data_buffer, size_t data_buffer_size)
     
    491491        }
    492492
    493         if (!usb_endpoint_pipe_is_session_started(pipe)) {
     493        if (!usb_pipe_is_session_started(pipe)) {
    494494                return EBADF;
    495495        }
     
    500500        }
    501501
    502         int rc = usb_endpoint_pipe_control_write_no_check(pipe,
     502        int rc = usb_pipe_control_write_no_check(pipe,
    503503            setup_buffer, setup_buffer_size, data_buffer, data_buffer_size);
    504504
  • uspace/lib/usb/src/recognise.c

    ra372663 r3954a63b  
    370370        }
    371371
    372         rc = usb_endpoint_pipe_initialize_default_control(&ctrl_pipe,
     372        rc = usb_pipe_initialize_default_control(&ctrl_pipe,
    373373            &dev_connection);
    374374        if (rc != EOK) {
    375375                goto failure;
    376376        }
    377         rc = usb_endpoint_pipe_probe_default_control(&ctrl_pipe);
     377        rc = usb_pipe_probe_default_control(&ctrl_pipe);
    378378        if (rc != EOK) {
    379379                goto failure;
     
    404404        child->driver_data = dev_data;
    405405
    406         rc = usb_endpoint_pipe_start_session(&ctrl_pipe);
     406        rc = usb_pipe_start_session(&ctrl_pipe);
    407407        if (rc != EOK) {
    408408                goto failure;
     
    414414        }
    415415
    416         rc = usb_endpoint_pipe_end_session(&ctrl_pipe);
     416        rc = usb_pipe_end_session(&ctrl_pipe);
    417417        if (rc != EOK) {
    418418                goto failure;
  • uspace/lib/usb/src/request.c

    ra372663 r3954a63b  
    4242/** Generic wrapper for SET requests using standard control request format.
    4343 *
    44  * @see usb_endpoint_pipe_control_write
     44 * @see usb_pipe_control_write
    4545 *
    4646 * @param pipe Pipe used for the communication.
     
    9090        setup_packet.length = (uint16_t) data_size;
    9191
    92         int rc = usb_endpoint_pipe_control_write(pipe,
     92        int rc = usb_pipe_control_write(pipe,
    9393            &setup_packet, sizeof(setup_packet),
    9494            data, data_size);
     
    9999 /** Generic wrapper for GET requests using standard control request format.
    100100  *
    101   * @see usb_endpoint_pipe_control_read
     101  * @see usb_pipe_control_read
    102102  *
    103103  * @param pipe Pipe used for the communication.
     
    150150        setup_packet.length = (uint16_t) data_size;
    151151
    152         int rc = usb_endpoint_pipe_control_read(pipe,
     152        int rc = usb_pipe_control_read(pipe,
    153153            &setup_packet, sizeof(setup_packet),
    154154            data, data_size, actual_data_size);
Note: See TracChangeset for help on using the changeset viewer.