-
大小: 1.52M文件类型: .rar金币: 1下载: 0 次发布日期: 2021-04-13
- 语言: C#
- 标签: USBLib officialp82 shootxyk libusb
资源简介
usblib完整库,包含例子,各位仅供参考一下
代码片段和文件信息
/*
* Copyright © 2001 Stephen Williams (steve@icarus.com)
* Copyright © 2001-2002 David Brownell (dbrownell@users.sourceforge.net)
* Copyright © 2008 Roger Williams (rawqux@users.sourceforge.net)
* Copyright © 2012 Pete Batard (pete@akeo.ie)
* Copyright © 2013 Federico Manzan (f.manzan@gmail.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
* General Public License as published by the Free Software
* Foundation; either version 2 of the License or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 59 Temple Place - Suite 330 Boston MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include “libusb.h“
#include “ezusb.h“
extern void logerror(const char *format ...)
__attribute__ ((format(printf 1 2)));
/*
* This file contains functions for uploading firmware into Cypress
* EZ-USB microcontrollers. These chips use control endpoint 0 and vendor
* specific commands to support writing into the on-chip SRAM. They also
* support writing into the CPUCS register which is how we reset the
* processor after loading firmware (including the reset vector).
*
* These Cypress devices are 8-bit 8051 based microcontrollers with
* special support for USB I/O. They come in several packages and
* some can be set up with external memory when device costs allow.
* Note that the design was originally by AnchorChips so you may find
* references to that vendor (which was later merged into Cypress).
* The Cypress FX parts are largely compatible with the Anchorhip ones.
*/
int verbose = 1;
/*
* return true if [addraddr+len] includes external RAM
* for Anchorchips EZ-USB or Cypress EZ-USB FX
*/
static bool fx_is_external(uint32_t addr size_t len)
{
/* with 8KB RAM 0x0000-0x1b3f can be written
* we can‘t tell if it‘s a 4KB device here
*/
if (addr <= 0x1b3f)
return ((addr + len) > 0x1b40);
/* there may be more RAM; unclear if we can write it.
* some bulk buffers may be unused 0x1b3f-0x1f3f
* firmware can set ISODISAB for 2KB at 0x2000-0x27ff
*/
return true;
}
/*
* return true if [addraddr+len] includes external RAM
* for Cypress EZ-USB FX2
*/
static bool fx2_is_external(uint32_t addr size_t len)
{
/* 1st 8KB for data/code 0x0000-0x1fff */
if (addr <= 0x1fff)
return ((addr + len) > 0x2000);
/* and 512 for data 0xe000-0xe1ff */
else if (addr >= 0xe000
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 99328 2018-03-25 09:00 libusb\examples\bin32\fxload.exe
文件 83968 2018-03-25 09:00 libusb\examples\bin32\listdevs.exe
文件 91136 2018-03-25 09:00 libusb\examples\bin32\testlibusb.exe
文件 104960 2018-03-25 09:00 libusb\examples\bin32\xusb.exe
文件 114688 2018-03-25 09:00 libusb\examples\bin64\fxload.exe
文件 99840 2018-03-25 09:00 libusb\examples\bin64\listdevs.exe
文件 108544 2018-03-25 09:00 libusb\examples\bin64\testlibusb.exe
文件 123904 2018-03-25 09:00 libusb\examples\bin64\xusb.exe
文件 24538 2018-03-25 09:00 libusb\examples\source\ezusb.c
文件 4431 2018-03-25 09:00 libusb\examples\source\ezusb.h
文件 9661 2018-03-25 09:00 libusb\examples\source\fxload.c
文件 1893 2018-03-25 09:00 libusb\examples\source\listdevs.c
文件 7315 2018-03-25 09:00 libusb\examples\source\stdint.h
文件 8920 2018-03-25 09:00 libusb\examples\source\testlibusb.c
文件 39690 2018-03-25 09:00 libusb\examples\source\xusb.c
文件 74841 2018-03-25 09:00 libusb\include\libusb-1.0\libusb.h
文件 7722 2018-03-25 09:00 libusb\libusb-1.0.def
文件 257912 2018-03-25 09:00 libusb\MinGW32\dll\libusb-1.0.dll
文件 140064 2018-03-25 09:00 libusb\MinGW32\dll\libusb-1.0.dll.a
文件 182472 2018-03-25 09:00 libusb\MinGW32\static\libusb-1.0.a
文件 280371 2018-03-25 09:00 libusb\MinGW64\dll\libusb-1.0.dll
文件 140764 2018-03-25 09:00 libusb\MinGW64\dll\libusb-1.0.dll.a
文件 199682 2018-03-25 09:00 libusb\MinGW64\static\libusb-1.0.a
文件 102912 2018-03-25 09:00 libusb\MS32\dll\libusb-1.0.dll
文件 49464 2018-03-25 09:00 libusb\MS32\dll\libusb-1.0.lib
文件 953344 2018-03-25 09:00 libusb\MS32\dll\libusb-1.0.pdb
文件 937612 2018-03-25 09:00 libusb\MS32\static\libusb-1.0.lib
文件 121856 2018-03-25 09:00 libusb\MS64\dll\libusb-1.0.dll
文件 46686 2018-03-25 09:00 libusb\MS64\dll\libusb-1.0.lib
文件 904192 2018-03-25 09:00 libusb\MS64\dll\libusb-1.0.pdb
............此处省略24个文件信息
评论
共有 条评论