⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filemakerdlg.h

📁 此程序是利用VC实现了USB的驱动程序。
💻 H
字号:
// FileMakerDlg.h : header file
//
//{{AFX_INCLUDES()

//}}AFX_INCLUDES

#if !defined(AFX_FileMakerDLG_H__DE2B5C26_6FE8_489F_AFB5_AF92AEC57EF6__INCLUDED_)
#define AFX_FileMakerDLG_H__DE2B5C26_6FE8_489F_AFB5_AF92AEC57EF6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CFileMakerDlg dialog

class CFileMakerDlg : public CDialog
{
// Construction
public:
	CFileMakerDlg(CWnd* pParent = NULL);	// standard constructor
	void OnSomeOneMsg(WPARAM wParam,LPARAM lParam);

// Dialog Data
	//{{AFX_DATA(CFileMakerDlg)
	enum { IDD = IDD_FILEMAKER_DIALOG };
	CEdit	m_FlashUpdateAddrCtrl;
	CButton	m_CommondDataSend;
	CEdit	m_CommondDataCtrl;
	CButton	m_FileModeCtrl;
	CListBox	m_MessageList;
	CEdit	m_FileNameCtrl;
	CButton	m_ButtonUpdate;
	CButton	m_DataWRctrlCH1;
	CButton	m_ButtonOpen;
	CButton	m_ButtonStart;
	CString	m_TimeCounter;
	BOOL	m_USBconnected;
	BOOL	m_USBtransferring;
	BOOL	m_DataWriteChannel1;
	CString	m_PlayFileName;
	BOOL	m_SampleState;
	BOOL	m_FlashUpdateMode;
	CString	m_CommondDataStr;
	CString	m_FlashUpdateAddr;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFileMakerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CFileMakerDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonRead();
	virtual void OnCancel();
	afx_msg void OnButtonOpen();
	afx_msg void OnButtonUpdate();
	afx_msg void OnButtonClear();
	afx_msg void OnButtonReset();
	afx_msg void OnCheckStartUp();
	afx_msg void OnCheck4();
	afx_msg void OnChangeEdit1();
	afx_msg void OnChangeEdit2();
	afx_msg void OnCommondDataSend();
	afx_msg void OnChangeEdit3();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

typedef PVOID USBD_PIPE_HANDLE;
typedef PVOID USBD_CONFIGURATION_HANDLE;
typedef PVOID USBD_INTERFACE_HANDLE;

typedef enum _USBD_PIPE_TYPE {
    UsbdPipeTypeControl,
    UsbdPipeTypeIsochronous,
    UsbdPipeTypeBulk,
    UsbdPipeTypeInterrupt
} USBD_PIPE_TYPE;

typedef struct _USBD_PIPE_INFORMATION {
    //
    // OUTPUT
    // These fields are filled in by USBD
    //
    USHORT MaximumPacketSize;  // Maximum packet size for this pipe
    UCHAR EndpointAddress;     // 8 bit USB endpoint address (includes direction)
                               // taken from endpoint descriptor
    UCHAR Interval;            // Polling interval in ms if interrupt pipe 
    
    USBD_PIPE_TYPE PipeType;   // PipeType identifies type of transfer valid for this pipe
    USBD_PIPE_HANDLE PipeHandle;
    
    //
    // INPUT
    // These fields are filled in by the client driver
    //
    ULONG MaximumTransferSize; // Maximum size for a single request
                               // in bytes.
    ULONG PipeFlags;                                   
} USBD_PIPE_INFORMATION, *PUSBD_PIPE_INFORMATION;

typedef struct _USBD_INTERFACE_INFORMATION {
    USHORT Length;       // Length of this structure, including
                         // all pipe information structures that
                         // follow.
    //
    // INPUT
    //
    // Interface number and Alternate setting this
    // structure is associated with
    //
    UCHAR InterfaceNumber;
    UCHAR AlternateSetting;
    
    //
    // OUTPUT
    // These fields are filled in by USBD
    //
    UCHAR Class;
    UCHAR SubClass;
    UCHAR Protocol;
    UCHAR Reserved;
    
    USBD_INTERFACE_HANDLE InterfaceHandle;
    ULONG NumberOfPipes; 

    //
    // INPUT/OUPUT
    // see PIPE_INFORMATION
    USBD_PIPE_INFORMATION Pipes;//[0];

} USBD_INTERFACE_INFORMATION, *PUSBD_INTERFACE_INFORMATION;

typedef LONG USBD_STATUS;

typedef struct _USBD_ISO_PACKET_DESCRIPTOR {
    ULONG Offset;       // INPUT Offset of the packet from the begining of the
                        // buffer.

    ULONG Length;       // OUTPUT length of data received (for in).
                        // OUTPUT 0 for OUT.
    USBD_STATUS Status; // status code for this packet.     
} USBD_ISO_PACKET_DESCRIPTOR, *PUSBD_ISO_PACKET_DESCRIPTOR;

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FileMakerDLG_H__DE2B5C26_6FE8_489F_AFB5_AF92AEC57EF6__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -