fucdlayer.h
来自「atmel芯片的Linux驱动程序。很多802.11协议的无限网卡都使用该芯片」· C头文件 代码 · 共 74 行
H
74 行
#ifndef __FUCDLAYER_H__#define __FUCDLAYER_H__#include <wx/wx.h>#include "dfu.h"#include "atmel.h"class UsbDevInfo { private: wxString *_name; struct usb_device *_device; usb_dev_handle *_handle; int _devnum; public: UsbDevInfo(struct usb_device *dev, int devnum); wxString *GetName() { return _name; }; void Prepare(); void Close(); usb_dev_handle *GetHandle() { return _handle; };};class FucdLayer { protected: wxString filename; int n_devices; int _activedev; UsbDevInfo *devinfos[MAX_DEVICES]; unsigned char **firmware; unsigned int fwsize; unsigned char _opermode; public: FucdLayer(); void SetFilename(const wxString fname); bool FindDevices(); unsigned int GetFwSize() { return fwsize; }; unsigned char ** GetFw() { return firmware; }; void GetDevNames(wxChoice* choice); void Prepare(); int GetActive() { return (_activedev < n_devices ? _activedev: -1 ); }; void SetActive(int active) { _activedev=active; }; void Close(); public: // PORTED FUCTIONS // ***** atmel.c ***** bool AtmelFirmwareUpgrade(wxGauge*); bool ReadFirmware(); int DownloadFirmware(); bool AtmelGetFwVersion(wxString &ver); bool AtmelGetModeOfOperation(); // ***** dfu.c ***** int DFUDetach(); int DFUDownload(usb_dev_handle *dev, char *Buffer, unsigned long Bytes, unsigned short Block); int DFUGetStatus(usb_dev_handle * dev, struct dfu_status *status); unsigned char DFUGetState(usb_dev_handle * dev, char *state); int DeviceFirmwareUpgrade(int idVendor, int idProduct); protected: // internal functions void _init_usb_subsystem();};#endif // __FUCDLAYER_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?