Ignore:
Timestamp:
2018-02-12T10:11:47Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5fe3f954
Parents:
2f762a7
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-05 03:28:50)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-12 10:11:47)
Message:

usb: rethinking DMA buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h

    r2f762a7 r1d758fc  
    7070        } setup;
    7171
     72        /** DMA buffer with enforced policy */
     73        dma_buffer_t dma_buffer;
     74        /** Size of memory buffer */
     75        size_t offset, size;
     76
    7277        /**
    7378         * In case a bounce buffer is allocated, the original buffer must to be
    7479         * stored to be filled after the IN transaction is finished.
    7580         */
    76         char *buffer;
    77         /** Size of memory buffer */
    78         size_t buffer_size;
    79 
    80         /** DMA buffer with enforced policy */
    81         dma_buffer_t dma_buffer;
     81        char *original_buffer;
    8282        bool is_bounced;
    8383
     
    107107        usb_str_transfer_type_short((batch).ep->transfer_type), \
    108108        usb_str_direction((batch).dir), \
    109         (batch).buffer_size, (batch).ep->max_packet_size
     109        (batch).size, (batch).ep->max_packet_size
    110110
    111111/** Wrapper for bus operation. */
     
    115115void usb_transfer_batch_init(usb_transfer_batch_t *, endpoint_t *);
    116116
     117/** Buffer handling */
     118bool usb_transfer_batch_bounce_required(usb_transfer_batch_t *);
    117119errno_t usb_transfer_batch_bounce(usb_transfer_batch_t *);
    118 /** Buffer preparation */
    119 errno_t usb_transfer_batch_prepare_buffer(usb_transfer_batch_t *, char *);
    120120
    121121/** Batch finalization. */
Note: See TracChangeset for help on using the changeset viewer.