📄 bulkout.c
字号:
/*++
Copyright (c) 2001 Sunplus Technology Co., Ltd.
Module Name:
bulkout.c
Abstract:
Module related to bulk out pipe
Environment:
Keil C51 Compiler
Revision History:
08/28/2001 Chi-Yeh Tsai created
--*/
//=============================================================================
//Header file
//=============================================================================
#include "general.h"
#include "bulkout.h"
#include "main.h"
#include "intr.h"
#include "ctlsetup.h"
#include "usbsidc.h"
#include "usbmsdc2.h"
//richie@si0425
#include "uiflow.h"
//=============================================================================
//Symbol
//=============================================================================
//-----------------------------------------------------------------------------
//Constant
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//Variable
//-----------------------------------------------------------------------------
data BIT G_btDataShort;
xdata ULONG G_ulStorDataLength;
xdata ULONG G_ulStorDataIndex;
xdata UCHAR G_ucBulkPhase;
/*++
xdata UCHAR G_ucBulk2Phase;
--*/
//=============================================================================
//Program
//=============================================================================
//-----------------------------------------------------------------------------
//BULKOUT_Packet
//-----------------------------------------------------------------------------
void BULKOUT_Packet(void) USING_1
/*++
Routine Description:
process packet of bulk out pipe of storage interface
Arguments:
none
Return Value:
none
--*/
{
#if (USBMSDC_OPTION == 1)
if (G_ucPktStorIntrf == K_StorageInterface1)
{
if (G_ucStorIntrf1Class == K_MassStorageClassCbi)
USBMSDC_CbiBulkOutData();
}
else //if (G_ucPktStorIntrf == K_StorageInterface2)
{
if (G_ucStorIntrf2Class == K_MassStorageClassCbi)
USBMSDC_CbiBulkOutData();
}
#endif
#if (USBMSDC_OPTION == 2)
if (G_ucPktStorIntrf == K_StorageInterface1)
{
//richie@si0417
// if (G_ucStorIntrf1Class == K_MassStorageClassBo)
// if (G_ui_status == K_UI_mass_storage)
if ( ((G_UIStatus & 0xff00) == K_UISTATUS_USBMODE_MASS) //yichang@replace
&& (G_CameraOptions.Storage == K_UIOPTION_STORAGE_MSDC) )
USBMSDC_BoBulkOutData();
}
else //if (G_ucPktStorIntrf == K_StorageInterface2)
{
//richie@si0417
// if (G_ucStorIntrf1Class == K_MassStorageClassBo)
// if (G_ui_status == K_UI_mass_storage)
if ( ((G_UIStatus & 0xff00) == K_UISTATUS_USBMODE_MASS) //yichang@replace
&& (G_CameraOptions.Storage == K_UIOPTION_STORAGE_MSDC) )
USBMSDC_BoBulkOutData();
}
#endif
#if (USBSIDC_OPTION == 1)
if (G_ucPktStorIntrf == K_StorageInterface1)
{
//richie@si0417
// if (G_ucStorIntrf1Class == K_StillImageClass)
// if (G_ui_status == K_UI_still_image_class)
if ( ((G_UIStatus & 0xff00) == K_UISTATUS_USBMODE_MASS) //yichang@replace
&& (G_CameraOptions.Storage == K_UIOPTION_STORAGE_SIDC) )
USBSIDC_BulkOutData();
}
else //if (G_ucPktStorIntrf == K_StorageInterface2)
{
//richie@si0417
// if (G_ucStorIntrf1Class == K_StillImageClass)
// if (G_ui_status == K_UI_still_image_class)
if ( ((G_UIStatus & 0xff00) == K_UISTATUS_USBMODE_MASS) //yichang@replace
&& (G_CameraOptions.Storage == K_UIOPTION_STORAGE_SIDC) )
USBSIDC_BulkOutData();
}
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -