Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00

40 lines
1.0 KiB
C

/*
* "Bulk only transfer" related implementation
*/
#include <assert.h>
#include <string.h> /* memset */
#include "common.h"
#include "bulk.h"
/*===========================================================================*
* init_cbw *
*===========================================================================*/
void
init_cbw(mass_storage_cbw * cbw, unsigned int tag)
{
assert(NULL != cbw);
/* Clearing "Command Block Wrapper" */
memset(cbw, 0, sizeof(*cbw));
/* Filling Command Block Wrapper */
cbw->dCBWSignature = CBW_SIGNATURE;
cbw->dCBWTag = tag;
cbw->bCBWLUN = 0;
}
/*===========================================================================*
* init_csw *
*===========================================================================*/
void
init_csw(mass_storage_csw * csw)
{
assert(NULL != csw);
/* Clearing "Command Status Wrapper" so we can receive data into it */
memset(csw, 0, sizeof(*csw));
}