2014-03-28 23:33:35 +08:00
|
|
|
#ifndef GMIO_TRANSFER_H
|
|
|
|
#define GMIO_TRANSFER_H
|
2013-03-06 18:49:53 +08:00
|
|
|
|
|
|
|
#include "global.h"
|
|
|
|
#include "stream.h"
|
|
|
|
#include "task_control.h"
|
|
|
|
|
2014-03-13 21:37:55 +08:00
|
|
|
/*! Defines data required for any transfer(read/write) operation */
|
2014-03-28 23:33:35 +08:00
|
|
|
struct gmio_transfer
|
2013-03-06 18:49:53 +08:00
|
|
|
{
|
2014-03-13 21:37:55 +08:00
|
|
|
/*! The stream to be used for I/O */
|
2014-03-28 23:33:35 +08:00
|
|
|
gmio_stream_t stream;
|
2014-03-13 21:37:55 +08:00
|
|
|
|
|
|
|
/*! The optional control object used to handle progress of the transfer */
|
2014-03-28 23:33:35 +08:00
|
|
|
gmio_task_control_t task_control;
|
2014-03-13 21:37:55 +08:00
|
|
|
|
|
|
|
/*! Pointer on a user memory area used by the transfer as a buffer for stream optimization */
|
2013-03-06 18:49:53 +08:00
|
|
|
void* buffer;
|
2014-03-13 21:37:55 +08:00
|
|
|
|
2014-03-28 23:33:35 +08:00
|
|
|
/*! Size (in bytes) of the memory buffer */
|
2013-03-06 18:49:53 +08:00
|
|
|
size_t buffer_size;
|
2014-02-13 19:02:40 +08:00
|
|
|
};
|
|
|
|
|
2014-03-28 23:33:35 +08:00
|
|
|
typedef struct gmio_transfer gmio_transfer_t;
|
2013-03-06 18:49:53 +08:00
|
|
|
|
2014-03-28 23:33:35 +08:00
|
|
|
#endif /* GMIO_TRANSFER_H */
|