Changeset d15809b4 in mainline for uspace/drv/uhci-hcd/batch.h


Ignore:
Timestamp:
2011-02-14T10:14:31Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
962ce100
Parents:
0d36c20 (diff), 45c01a1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/batch.h

    r0d36c20 rd15809b4  
    3232 * @brief UHCI driver
    3333 */
    34 #ifndef DRV_UHCI_TRACKER_H
    35 #define DRV_UHCI_TRACKER_H
     34#ifndef DRV_UHCI_BATCH_H
     35#define DRV_UHCI_BATCH_H
    3636
    3737#include <adt/list.h>
     
    4141
    4242#include "uhci_struct/transfer_descriptor.h"
     43#include "uhci_struct/queue_head.h"
    4344
    4445typedef enum {
     
    4748} dev_speed_t;
    4849
    49 typedef struct tracker
     50typedef struct batch
    5051{
    5152        link_t link;
     53        dev_speed_t speed;
    5254        usb_target_t target;
    5355        usb_transfer_type_t transfer_type;
     
    5759        };
    5860        void *arg;
     61        char *transport_buffer;
     62        char *setup_buffer;
     63        size_t setup_size;
    5964        char *buffer;
    60         char *packet;
    6165        size_t buffer_size;
    6266        size_t max_packet_size;
    63         size_t packet_size;
    64         size_t buffer_offset;
    65         dev_speed_t speed;
     67        size_t packets;
     68        size_t transfered_size;
     69        int error;
    6670        device_t *dev;
    67         transfer_descriptor_t *td;
    68         void (*next_step)(struct tracker*);
    69         unsigned toggle:1;
    70 } tracker_t;
     71        queue_head_t *qh;
     72        transfer_descriptor_t *tds;
     73        void (*next_step)(struct batch*);
     74} batch_t;
    7175
    72 
    73 tracker_t * tracker_get(device_t *dev, usb_target_t target,
     76batch_t * batch_get(device_t *dev, usb_target_t target,
    7477    usb_transfer_type_t transfer_type, size_t max_packet_size,
    7578    dev_speed_t speed, char *buffer, size_t size,
     79                char *setup_buffer, size_t setup_size,
    7680    usbhc_iface_transfer_in_callback_t func_in,
    7781    usbhc_iface_transfer_out_callback_t func_out, void *arg);
    7882
    79 void tracker_control_write(
    80     tracker_t *instance, char* setup_buffer, size_t setup_size);
     83bool batch_is_complete(batch_t *instance);
    8184
    82 void tracker_control_read(
    83     tracker_t *instance, char* setup_buffer, size_t setup_size);
     85void batch_control_write(batch_t *instance);
    8486
    85 void tracker_interrupt_in(tracker_t *instance);
     87void batch_control_read(batch_t *instance);
    8688
    87 void tracker_interrupt_out(tracker_t *instance);
     89void batch_interrupt_in(batch_t *instance);
     90
     91void batch_interrupt_out(batch_t *instance);
    8892
    8993/* DEPRECATED FUNCTIONS NEEDED BY THE OLD API */
    90 void tracker_control_setup_old(tracker_t *instance);
     94void batch_control_setup_old(batch_t *instance);
    9195
    92 void tracker_control_write_data_old(tracker_t *instance);
     96void batch_control_write_data_old(batch_t *instance);
    9397
    94 void tracker_control_read_data_old(tracker_t *instance);
     98void batch_control_read_data_old(batch_t *instance);
    9599
    96 void tracker_control_write_status_old(tracker_t *instance);
     100void batch_control_write_status_old(batch_t *instance);
    97101
    98 void tracker_control_read_status_old(tracker_t *instance);
     102void batch_control_read_status_old(batch_t *instance);
    99103#endif
    100104/**
Note: See TracChangeset for help on using the changeset viewer.