├── README.md ├── demo ├── u1.jpg ├── u2.jpg ├── u3.jpg └── u4.jpg ├── eps32s2_usb_display_readme.doc ├── esp32s2_usbdisp ├── CMakeLists.txt ├── LICENSE ├── Makefile ├── README.md ├── main │ ├── CMakeLists.txt │ ├── Kconfig.projbuild │ ├── component.mk │ ├── decode_jpeg.c │ ├── decode_jpeg.h │ ├── ili9340.c │ ├── ili9340.h │ ├── log.h │ ├── logo.c │ ├── main.c │ ├── tjpgd.c │ ├── tjpgd.h │ └── tjpgdcnf.h ├── partitions.csv └── sdkconfig.defaults ├── rpusbdisp ├── .gitignore ├── LICENSE ├── README.md ├── drivers │ ├── common │ │ └── inc │ │ │ └── protocol.h │ ├── linux-driver │ │ ├── Kconfig │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── NewMakefile │ │ ├── run.sh │ │ ├── src │ │ │ ├── fbhandlers.c │ │ │ ├── inc │ │ │ │ ├── common.h │ │ │ │ ├── devconf.h │ │ │ │ ├── drvconf.h │ │ │ │ ├── fbhandlers.h │ │ │ │ ├── tiny_jpeg.h │ │ │ │ ├── touchhandlers.h │ │ │ │ ├── types.h │ │ │ │ └── usbhandlers.h │ │ │ ├── main.c │ │ │ ├── tiny_jpeg.c │ │ │ ├── touchhandlers.c │ │ │ └── usbhandlers.c │ │ ├── stop.sh │ │ └── xserver_conf │ │ │ ├── 10-disp.conf │ │ │ ├── 10-intel.conf │ │ │ ├── 10-rpi.conf │ │ │ └── README │ └── usermode-sdk │ │ ├── .gitignore │ │ ├── Doxygen │ │ ├── Makefile.conf.in │ │ ├── Makefile.in │ │ ├── Makefile.prev │ │ ├── README.md │ │ ├── configure │ │ ├── configure.ac │ │ ├── demo │ │ ├── Makefile │ │ └── src │ │ │ └── main.cc │ │ ├── deps-wraps │ │ ├── Makefile │ │ └── libusbx_wrap │ │ │ ├── Makefile │ │ │ ├── include │ │ │ └── rp │ │ │ │ └── deps │ │ │ │ └── libusbx_wrap │ │ │ │ ├── context.h │ │ │ │ ├── device.h │ │ │ │ ├── device_handle.h │ │ │ │ ├── device_list.h │ │ │ │ ├── enums.h │ │ │ │ ├── libusbx_wrap.h │ │ │ │ ├── scopes.h │ │ │ │ └── transfer.h │ │ │ └── src │ │ │ ├── context.cc │ │ │ ├── device.cc │ │ │ ├── device_handle.cc │ │ │ ├── device_list.cc │ │ │ ├── scopes.cc │ │ │ ├── transfer.cc │ │ │ └── transfer_buffer.cc │ │ ├── deps │ │ ├── libpng-1.6.7 │ │ │ ├── .deps │ │ │ │ ├── png.Plo │ │ │ │ ├── pngerror.Plo │ │ │ │ ├── pngget.Plo │ │ │ │ ├── pngmem.Plo │ │ │ │ ├── pngpread.Plo │ │ │ │ ├── pngread.Plo │ │ │ │ ├── pngrio.Plo │ │ │ │ ├── pngrtran.Plo │ │ │ │ ├── pngrutil.Plo │ │ │ │ ├── pngset.Plo │ │ │ │ ├── pngtest.Po │ │ │ │ ├── pngtrans.Plo │ │ │ │ ├── pngwio.Plo │ │ │ │ ├── pngwrite.Plo │ │ │ │ ├── pngwtran.Plo │ │ │ │ └── pngwutil.Plo │ │ │ ├── .libs │ │ │ │ ├── libpng16-symbols.expsym │ │ │ │ ├── pngfix │ │ │ │ ├── pngstest │ │ │ │ ├── pngtest │ │ │ │ ├── pngunknown │ │ │ │ └── pngvalid │ │ │ ├── Makefile │ │ │ ├── Makefile.orig │ │ │ ├── arm │ │ │ │ └── .deps │ │ │ │ │ ├── arm_init.Plo │ │ │ │ │ ├── filter_neon.Plo │ │ │ │ │ └── filter_neon_intrinsics.Plo │ │ │ ├── config.h │ │ │ ├── config.status │ │ │ ├── contrib │ │ │ │ ├── libtests │ │ │ │ │ ├── .deps │ │ │ │ │ │ ├── .dirstamp │ │ │ │ │ │ ├── pngstest.Po │ │ │ │ │ │ ├── pngunknown.Po │ │ │ │ │ │ └── pngvalid.Po │ │ │ │ │ └── .dirstamp │ │ │ │ └── tools │ │ │ │ │ ├── .deps │ │ │ │ │ ├── .dirstamp │ │ │ │ │ ├── png-fix-itxt.Po │ │ │ │ │ └── pngfix.Po │ │ │ │ │ └── .dirstamp │ │ │ ├── libpng-config │ │ │ ├── libpng.pc │ │ │ ├── libpng.sym │ │ │ ├── libpng16-config │ │ │ ├── libpng16.pc │ │ │ ├── libtool │ │ │ ├── png-fix-itxt │ │ │ ├── pngfix │ │ │ ├── pnglibconf.dfn │ │ │ ├── pnglibconf.h │ │ │ ├── pnglibconf.out │ │ │ ├── pngprefix.h │ │ │ ├── pngstest │ │ │ ├── pngtest │ │ │ ├── pngunknown │ │ │ ├── pngvalid │ │ │ ├── scripts │ │ │ │ └── sym.out │ │ │ └── stamp-h1 │ │ └── libusbx-1.0.17 │ │ │ ├── AUTHORS │ │ │ ├── COPYING │ │ │ ├── ChangeLog │ │ │ ├── INSTALL │ │ │ ├── Makefile │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── NEWS │ │ │ ├── PORTING │ │ │ ├── README │ │ │ ├── TODO │ │ │ ├── Xcode │ │ │ ├── common.xcconfig │ │ │ ├── config.h │ │ │ ├── debug.xcconfig │ │ │ ├── libusbx.xcconfig │ │ │ ├── libusbx.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ ├── libusbx_debug.xcconfig │ │ │ ├── libusbx_release.xcconfig │ │ │ └── release.xcconfig │ │ │ ├── aclocal.m4 │ │ │ ├── android │ │ │ ├── README │ │ │ ├── config.h │ │ │ └── jni │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ ├── examples.mk │ │ │ │ ├── libusb.mk │ │ │ │ └── tests.mk │ │ │ ├── compile │ │ │ ├── config.guess │ │ │ ├── config.h │ │ │ ├── config.h.in │ │ │ ├── config.status │ │ │ ├── config.sub │ │ │ ├── configure │ │ │ ├── configure.ac │ │ │ ├── depcomp │ │ │ ├── examples │ │ │ ├── .deps │ │ │ │ ├── dpfp.Po │ │ │ │ ├── dpfp_threaded-dpfp_threaded.Po │ │ │ │ ├── fxload-ezusb.Po │ │ │ │ ├── fxload-fxload.Po │ │ │ │ ├── hotplugtest.Po │ │ │ │ ├── listdevs.Po │ │ │ │ ├── sam3u_benchmark.Po │ │ │ │ └── xusb.Po │ │ │ ├── Makefile │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── dpfp.c │ │ │ ├── dpfp_threaded.c │ │ │ ├── ezusb.c │ │ │ ├── ezusb.h │ │ │ ├── fxload.c │ │ │ ├── getopt │ │ │ │ ├── getopt.c │ │ │ │ ├── getopt.h │ │ │ │ └── getopt1.c │ │ │ ├── hotplugtest.c │ │ │ ├── listdevs.c │ │ │ ├── sam3u_benchmark.c │ │ │ └── xusb.c │ │ │ ├── install-sh │ │ │ ├── libtool │ │ │ ├── libusb-1.0.pc │ │ │ ├── libusb-1.0.pc.in │ │ │ ├── libusb │ │ │ ├── .deps │ │ │ │ ├── libusb_1_0_la-core.Plo │ │ │ │ ├── libusb_1_0_la-descriptor.Plo │ │ │ │ ├── libusb_1_0_la-hotplug.Plo │ │ │ │ ├── libusb_1_0_la-io.Plo │ │ │ │ ├── libusb_1_0_la-strerror.Plo │ │ │ │ └── libusb_1_0_la-sync.Plo │ │ │ ├── Makefile │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── core.c │ │ │ ├── descriptor.c │ │ │ ├── hotplug.c │ │ │ ├── hotplug.h │ │ │ ├── io.c │ │ │ ├── libusb-1.0.def │ │ │ ├── libusb-1.0.rc │ │ │ ├── libusb.h │ │ │ ├── libusbi.h │ │ │ ├── os │ │ │ │ ├── .deps │ │ │ │ │ ├── .dirstamp │ │ │ │ │ ├── libusb_1_0_la-darwin_usb.Plo │ │ │ │ │ ├── libusb_1_0_la-linux_netlink.Plo │ │ │ │ │ ├── libusb_1_0_la-linux_udev.Plo │ │ │ │ │ ├── libusb_1_0_la-linux_usbfs.Plo │ │ │ │ │ ├── libusb_1_0_la-netbsd_usb.Plo │ │ │ │ │ ├── libusb_1_0_la-openbsd_usb.Plo │ │ │ │ │ ├── libusb_1_0_la-poll_posix.Plo │ │ │ │ │ ├── libusb_1_0_la-poll_windows.Plo │ │ │ │ │ ├── libusb_1_0_la-threads_posix.Plo │ │ │ │ │ ├── libusb_1_0_la-threads_windows.Plo │ │ │ │ │ └── libusb_1_0_la-windows_usb.Plo │ │ │ │ ├── .dirstamp │ │ │ │ ├── darwin_usb.c │ │ │ │ ├── darwin_usb.h │ │ │ │ ├── linux_netlink.c │ │ │ │ ├── linux_udev.c │ │ │ │ ├── linux_usbfs.c │ │ │ │ ├── linux_usbfs.h │ │ │ │ ├── netbsd_usb.c │ │ │ │ ├── openbsd_usb.c │ │ │ │ ├── poll_posix.c │ │ │ │ ├── poll_posix.h │ │ │ │ ├── poll_windows.c │ │ │ │ ├── poll_windows.h │ │ │ │ ├── threads_posix.c │ │ │ │ ├── threads_posix.h │ │ │ │ ├── threads_windows.c │ │ │ │ ├── threads_windows.h │ │ │ │ ├── wince_usb.c │ │ │ │ ├── wince_usb.h │ │ │ │ ├── windows_common.h │ │ │ │ ├── windows_usb.c │ │ │ │ └── windows_usb.h │ │ │ ├── strerror.c │ │ │ ├── sync.c │ │ │ ├── version.h │ │ │ └── version_nano.h │ │ │ ├── ltmain.sh │ │ │ ├── m4 │ │ │ ├── libtool.m4 │ │ │ ├── ltoptions.m4 │ │ │ ├── ltsugar.m4 │ │ │ ├── ltversion.m4 │ │ │ └── lt~obsolete.m4 │ │ │ ├── missing │ │ │ ├── msvc │ │ │ ├── config.h │ │ │ ├── ddk_build.cmd │ │ │ ├── errno.h │ │ │ ├── fxload_2010.vcxproj │ │ │ ├── fxload_2010.vcxproj.filters │ │ │ ├── fxload_2012.vcxproj │ │ │ ├── fxload_2012.vcxproj.filters │ │ │ ├── fxload_sources │ │ │ ├── getopt_2005.vcproj │ │ │ ├── getopt_2010.vcxproj │ │ │ ├── getopt_2010.vcxproj.filters │ │ │ ├── getopt_2012.vcxproj │ │ │ ├── getopt_2012.vcxproj.filters │ │ │ ├── getopt_sources │ │ │ ├── hotplugtest_2010.vcxproj │ │ │ ├── hotplugtest_2010.vcxproj.filters │ │ │ ├── hotplugtest_2012.vcxproj │ │ │ ├── hotplugtest_2012.vcxproj.filters │ │ │ ├── hotplugtest_sources │ │ │ ├── inttypes.h │ │ │ ├── libusb_dll.dsp │ │ │ ├── libusb_dll_2005.vcproj │ │ │ ├── libusb_dll_2010.vcxproj │ │ │ ├── libusb_dll_2010.vcxproj.filters │ │ │ ├── libusb_dll_2012.vcxproj │ │ │ ├── libusb_dll_2012.vcxproj.filters │ │ │ ├── libusb_dll_wince.vcproj │ │ │ ├── libusb_sources │ │ │ ├── libusb_static.dsp │ │ │ ├── libusb_static_2005.vcproj │ │ │ ├── libusb_static_2010.vcxproj │ │ │ ├── libusb_static_2010.vcxproj.filters │ │ │ ├── libusb_static_2012.vcxproj │ │ │ ├── libusb_static_2012.vcxproj.filters │ │ │ ├── libusb_static_wince.vcproj │ │ │ ├── libusbx.dsw │ │ │ ├── libusbx_2005.sln │ │ │ ├── libusbx_2010.sln │ │ │ ├── libusbx_2012.sln │ │ │ ├── libusbx_wince.sln │ │ │ ├── listdevs.dsp │ │ │ ├── listdevs_2005.vcproj │ │ │ ├── listdevs_2010.vcxproj │ │ │ ├── listdevs_2010.vcxproj.filters │ │ │ ├── listdevs_2012.vcxproj │ │ │ ├── listdevs_2012.vcxproj.filters │ │ │ ├── listdevs_sources │ │ │ ├── listdevs_wince.vcproj │ │ │ ├── missing.c │ │ │ ├── missing.h │ │ │ ├── stdint.h │ │ │ ├── stress_2005.vcproj │ │ │ ├── stress_2010.vcxproj │ │ │ ├── stress_2010.vcxproj.filters │ │ │ ├── stress_2012.vcxproj │ │ │ ├── stress_2012.vcxproj.filters │ │ │ ├── stress_wince.vcproj │ │ │ ├── xusb.dsp │ │ │ ├── xusb_2005.vcproj │ │ │ ├── xusb_2010.vcxproj │ │ │ ├── xusb_2010.vcxproj.filters │ │ │ ├── xusb_2012.vcxproj │ │ │ ├── xusb_2012.vcxproj.filters │ │ │ ├── xusb_sources │ │ │ └── xusb_wince.vcproj │ │ │ ├── stamp-h1 │ │ │ └── tests │ │ │ ├── .deps │ │ │ ├── stress.Po │ │ │ └── testlib.Po │ │ │ ├── Makefile │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── libusbx_testlib.h │ │ │ ├── stress.c │ │ │ └── testlib.c │ │ ├── infra │ │ ├── Makefile │ │ ├── include │ │ │ └── rp │ │ │ │ ├── infra_config.h │ │ │ │ └── util │ │ │ │ ├── buffer.h │ │ │ │ ├── endian.h │ │ │ │ ├── exception.h │ │ │ │ ├── int_types.h │ │ │ │ ├── noncopyable.h │ │ │ │ └── scopes.h │ │ └── src │ │ │ └── util │ │ │ ├── buffer.cc │ │ │ ├── exception.cc │ │ │ └── scopes.cc │ │ ├── rpusbdisp-drv │ │ ├── Makefile │ │ ├── include │ │ │ └── rp │ │ │ │ └── drivers │ │ │ │ └── display │ │ │ │ └── rpusbdisp │ │ │ │ ├── c_interface.h │ │ │ │ ├── enums.h │ │ │ │ ├── protocol.h │ │ │ │ ├── rle.h │ │ │ │ └── rpusbdisp.h │ │ └── src │ │ │ ├── c_interface.cc │ │ │ ├── rle.cc │ │ │ └── rpusbdisp.cc │ │ ├── scripts │ │ ├── common.mak │ │ └── def.mak │ │ └── workspace │ │ ├── vs2013 │ │ └── rpusbdisp_sdk │ │ │ ├── infra │ │ │ ├── infra.vcxproj │ │ │ └── infra.vcxproj.filters │ │ │ ├── rpusbdisp_sdk.sln │ │ │ ├── usbdispdemo │ │ │ ├── usbdispdemo.vcxproj │ │ │ └── usbdispdemo.vcxproj.filters │ │ │ └── usbdispdrv │ │ │ ├── usbdispdrv.vcxproj │ │ │ └── usbdispdrv.vcxproj.filters │ │ └── xcode │ │ └── rpusbdispsdk │ │ └── rpusbdispsdk.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── tools │ └── arm_suite │ ├── .version │ ├── README.md │ ├── conf │ ├── 10-disp.conf │ └── rpusbdisp.conf │ ├── kernel_modules.tar.bz2 │ ├── rpusbdisp_arm_tool.sh │ └── scripts │ ├── rpusbdispd │ └── rpusbdispd.sh └── tinyusb.tgz /README.md: -------------------------------------------------------------------------------- 1 | # esp32s2_usb_display 2 | 3 | **overview** 4 | 5 | it's a USB mini display for Linux platform, such as raspberry Pi, Centos X86 server. 6 | 7 | it refer many opensource projects: robopeak/rpusbdisp,Bodmer/TFT_eSPI.git ,nopnop2002/esp-idf-ili9340,serge-rgb/TinyJPEG.git,TJpgDec. thanks 8 | 9 | esp32s2 support USB OTG, the Linux host compress framebuffer Zone with JPEG, and then issue URB to esp32s2, the S2 wil decode JPEG stream bytes to RGB data,and use DMA SPI to ili9341 screen. 10 | 11 | now it can run ~13pfs in most time. 12 | 13 | **folder intro:** 14 | 15 | /esp32s2_usbdisp is esp32s2 esp-idf project, it will generate esp32s2 binary file for programe 16 | 17 | /rpusbdisp is linux fb kernel driver module, it will generate rp_usbdisplay.ko 18 | 19 | eps32s2_usb_display_readme.doc is a file for how to Hardware connect and other info in CN 20 | 21 | **install:** 22 | 23 | in rpusbdisp, it have a README file which introduction how to install the ko and config xserver. 24 | 25 | **Demo** 26 | 27 | please seem below links for view demo: 28 | 29 | ![image](https://github.com/chuanjinpang/esp32s2_usb_display/blob/main/demo/u1.jpg) 30 | ![image](https://github.com/chuanjinpang/esp32s2_usb_display/blob/main/demo/u2.jpg) 31 | ![image](https://github.com/chuanjinpang/esp32s2_usb_display/blob/main/demo/u3.jpg) 32 | ![image](https://github.com/chuanjinpang/esp32s2_usb_display/blob/main/demo/u4.jpg) 33 | 34 | 35 | https://www.bilibili.com/video/BV17L411s7kL?spm_id_from=333.999.0.0 36 | 37 | https://www.bilibili.com/video/BV1dQ4y1z75s?spm_id_from=333.999.0.0 38 | 39 | -------------------------------------------------------------------------------- /demo/u1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/demo/u1.jpg -------------------------------------------------------------------------------- /demo/u2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/demo/u2.jpg -------------------------------------------------------------------------------- /demo/u3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/demo/u3.jpg -------------------------------------------------------------------------------- /demo/u4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/demo/u4.jpg -------------------------------------------------------------------------------- /eps32s2_usb_display_readme.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/eps32s2_usb_display_readme.doc -------------------------------------------------------------------------------- /esp32s2_usbdisp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's CMakeLists 2 | # in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(ili9340) 7 | 8 | # Create a SPIFFS image from the contents of the 'font' directory 9 | # that fits the partition named 'storage'. FLASH_IN_PROJECT indicates that 10 | # the generated image should be flashed when the entire project is flashed to 11 | # the target with 'idf.py -p PORT flash 12 | #spiffs_create_partition_image(storage font FLASH_IN_PROJECT) 13 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 nopnop2002 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := ili9340 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | # Create a SPIFFS image from the contents of the 'spiffs_image' directory 11 | # that fits the partition named 'storage'. FLASH_IN_PROJECT indicates that 12 | # the generated image should be flashed when the entire project is flashed to 13 | # the target with 'make flash'. 14 | SPIFFS_IMAGE_FLASH_IN_PROJECT := 1 15 | $(eval $(call spiffs_create_partition_image,storage,font)) 16 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(srcs "main.c" 2 | "ili9340.c" 3 | "decode_jpeg.c" 4 | "tjpgd.c" "logo.c" 5 | ) 6 | 7 | # tjpgd library does not exist in ESP32-S2 ROM. 8 | if(IDF_TARGET STREQUAL "esp32") 9 | list(APPEND srcs "decode_jpeg.c") 10 | endif() 11 | 12 | if(IDF_TARGET STREQUAL "esp32c3") 13 | list(APPEND srcs "decode_jpeg.c") 14 | endif() 15 | 16 | idf_component_register(SRCS ${srcs} 17 | INCLUDE_DIRS ".") 18 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/main/decode_jpeg.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "esp_err.h" 4 | 5 | #if 0 6 | typedef struct __attribute__((__packed__)) { 7 | uint8_t red; 8 | uint8_t green; 9 | uint8_t blue; 10 | } pixel_jpeg; 11 | #endif 12 | 13 | //rgb565 format 14 | typedef uint16_t pixel_jpeg; 15 | 16 | /** 17 | * @brief Decode the jpeg ``image.jpg`` embedded into the program file into pixel data. 18 | * 19 | * 20 | * Effectively, you can get the pixel data by doing ``decode_jpeg(&myPixels); pixelval=myPixels[ypos][xpos];`` 21 | * @return - ESP_ERR_NOT_SUPPORTED if image is malformed or a progressive jpeg file 22 | * - ESP_ERR_NO_MEM if out of memory 23 | * - ESP_OK on succesful decode 24 | */ 25 | 26 | esp_err_t decode_jpeg(uint16_t * imageWidth, uint16_t * imageHeight); 27 | 28 | 29 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/main/ili9340.h: -------------------------------------------------------------------------------- 1 | #ifndef MAIN_ILI9340_H_ 2 | #define MAIN_ILI9340_H_ 3 | 4 | #include "driver/spi_master.h" 5 | 6 | #define RED 0xf800 7 | #define GREEN 0x07e0 8 | #define BLUE 0x001f 9 | #define BLACK 0x0000 10 | #define WHITE 0xffff 11 | #define GRAY 0x8c51 12 | #define YELLOW 0xFFE0 13 | #define CYAN 0x07FF 14 | #define PURPLE 0xF81F 15 | 16 | 17 | #define DIRECTION0 0 18 | #define DIRECTION90 1 19 | #define DIRECTION180 2 20 | #define DIRECTION270 3 21 | 22 | typedef struct { 23 | uint16_t _model; 24 | uint16_t _width; 25 | uint16_t _height; 26 | uint16_t _offsetx; 27 | uint16_t _offsety; 28 | uint16_t _font_direction; 29 | uint16_t _font_fill; 30 | uint16_t _font_fill_color; 31 | uint16_t _font_underline; 32 | uint16_t _font_underline_color; 33 | int16_t _dc; 34 | int16_t _bl; 35 | spi_device_handle_t _SPIHandle; 36 | } TFT_t; 37 | 38 | void spi_master_init(TFT_t * dev, int16_t GPIO_MOSI, int16_t GPIO_SCLK, int16_t GPIO_CS, int16_t GPIO_DC, int16_t GPIO_RESET, int16_t GPIO_BL); 39 | bool spi_master_write_byte(spi_device_handle_t SPIHandle, const uint8_t* Data, size_t DataLength); 40 | bool spi_master_write_comm_byte(TFT_t * dev, uint8_t cmd); 41 | bool spi_master_write_comm_word(TFT_t * dev, uint16_t cmd); 42 | bool spi_master_write_data_byte(TFT_t * dev, uint8_t data); 43 | bool spi_master_write_data_word(TFT_t * dev, uint16_t data); 44 | bool spi_master_write_addr(TFT_t * dev, uint16_t addr1, uint16_t addr2); 45 | bool spi_master_write_color(TFT_t * dev, uint16_t color, uint16_t size); 46 | bool spi_master_write_colors(TFT_t * dev, uint16_t * colors, uint16_t size); 47 | 48 | void delayMS(int ms); 49 | void lcdWriteRegisterWord(TFT_t * dev, uint16_t addr, uint16_t data); 50 | void lcdWriteRegisterByte(TFT_t * dev, uint8_t addr, uint16_t data); 51 | void lcdInit(TFT_t * dev, uint16_t model, int width, int height, int offsetx, int offsety); 52 | void lcdBGRFilter(TFT_t * dev); 53 | void lcd_bitblt(TFT_t * dev, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t * colors) ; 54 | void lcd_bitblt_dma(TFT_t * dev, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t * colors); 55 | 56 | #endif /* MAIN_ILI9340_H_ */ 57 | 58 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/main/log.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef __LOG_H__ 4 | #define __LOG_H__ 5 | 6 | #define LOGD(fmt,args...) do {;}while(0) 7 | 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/main/tjpgdcnf.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------*/ 2 | /* TJpgDec System Configurations R0.03 */ 3 | /*----------------------------------------------*/ 4 | 5 | #define JD_SZBUF 1024 6 | /* Specifies size of stream input buffer */ 7 | 8 | #define JD_FORMAT 0 9 | /* Specifies output pixel format. 10 | / 0: RGB888 (24-bit/pix) 11 | / 1: RGB565 (16-bit/pix) 12 | / 2: Grayscale (8-bit/pix) 13 | */ 14 | 15 | #define JD_USE_SCALE 0 16 | /* Switches output descaling feature. 17 | / 0: Disable 18 | / 1: Enable 19 | */ 20 | 21 | #define JD_TBLCLIP 1 22 | /* Use table conversion for saturation arithmetic. A bit faster, but increases 1 KB of code size. 23 | / 0: Disable 24 | / 1: Enable 25 | */ 26 | 27 | #define JD_FASTDECODE 2 28 | /* Optimization level 29 | / 0: Basic optimization. Suitable for 8/16-bit MCUs. 30 | / 1: + 32-bit barrel shifter. Suitable for 32-bit MCUs. 31 | / 2: + Table conversion for huffman decoding (wants 6 << HUFF_BIT bytes of RAM) 32 | */ 33 | 34 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/partitions.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | # Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild 3 | nvs, data, nvs, 0x9000, 0x6000, 4 | phy_init, data, phy, 0xf000, 0x1000, 5 | factory, app, factory, 0x10000, 1M, 6 | storage, data, spiffs, , 0xF0000, 7 | -------------------------------------------------------------------------------- /esp32s2_usbdisp/sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # 2 | # Partition Table 3 | # 4 | CONFIG_PARTITION_TABLE_CUSTOM=y 5 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 6 | CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" 7 | 8 | # 9 | # ESP32-specific 10 | # 11 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 12 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 13 | 14 | # Disable WatchDog 15 | CONFIG_ESP_INT_WDT=n 16 | CONFIG_INT_WDT=n 17 | CONFIG_TASK_WDT=n 18 | -------------------------------------------------------------------------------- /rpusbdisp/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | 6 | # Compiled Dynamic libraries 7 | *.so 8 | *.dylib 9 | *.dll 10 | 11 | # Compiled Static libraries 12 | *.lai 13 | *.la 14 | *.a 15 | *.lib 16 | 17 | # kernel intermedate files 18 | *.o.cmd 19 | *.ko 20 | modules.order 21 | Module.symvers 22 | .tmp_versions 23 | 24 | # Mac os DS_Store 25 | .DS_Store 26 | 27 | # Visual Studio user related project files 28 | *.opensdf 29 | *.sdf 30 | *.suo 31 | *.tlog 32 | *.log 33 | *.user 34 | 35 | # XCode user related project files 36 | xcshareddata 37 | xcuserdata 38 | 39 | # Build result 40 | Debug 41 | Release 42 | build 43 | doc -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/Kconfig: -------------------------------------------------------------------------------- 1 | menuconfig FB_RPUSBDISP 2 | tristate "Robopeak USB Display" 3 | depends on FB && m 4 | select FB_CFB_FILLRECT 5 | select FB_CFB_COPYAREA 6 | select FB_CFB_IMAGEBLIT 7 | select FB_SYS_FILLRECT 8 | select FB_SYS_COPYAREA 9 | select FB_SYS_IMAGEBLIT 10 | select FB_SYS_FOPS 11 | select FB_MODE_HELPER 12 | select FB_DEFERRED_IO 13 | help 14 | Frame buffer driver for RoboPeak usb display 15 | The module will be called rp_usbdisplay. 16 | 17 | config RPUSBDISP_FPS 18 | int "display frame rate" 19 | default 16 20 | depends on FB_RPUSBDISP 21 | help 22 | Specify the frame rate used by the FB_DEFERRED_IO to update 23 | the display content 24 | This value can be overridden by the modprobe 25 | with the fps parameter 26 | 27 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/Makefile: -------------------------------------------------------------------------------- 1 | ###################################### 2 | # 3 | # RoboPeak USB LCD Display Linux Driver 4 | # 5 | # Copyright (C) 2009 - 2013 RoboPeak Team 6 | # This file is licensed under the GPL. See LICENSE in the package. 7 | # 8 | # http://www.robopeak.net 9 | # 10 | # Author Shikai Chen 11 | # 12 | ###################################### 13 | 14 | 15 | DRIVER_NAME := rp_usbdisplay 16 | KERNEL_SOURCE_DIR ?= /lib/modules/`uname -r`/build 17 | 18 | EXTRA_CFLAGS +=-g -I$(PWD)/src -I$(PWD)/../common 19 | 20 | obj-m := $(DRIVER_NAME).o 21 | 22 | DRIVER_FILES := src/main.o \ 23 | src/usbhandlers.o \ 24 | src/fbhandlers.o \ 25 | src/touchhandlers.o src/tiny_jpeg.o 26 | 27 | $(DRIVER_NAME)-objs:= $(DRIVER_FILES) 28 | 29 | modules: 30 | $(MAKE) -C $(KERNEL_SOURCE_DIR) KCPPFLAGS="$(EXTRA_CFLAGS)" M=$(PWD) modules 31 | 32 | modules_install: 33 | $(MAKE) -C $(KERNEL_SOURCE_DIR) M=$(PWD) modules_install 34 | 35 | install: modules_install 36 | 37 | clean: 38 | $(MAKE) -C $(KERNEL_SOURCE_DIR) M=$(PWD) clean 39 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/NewMakefile: -------------------------------------------------------------------------------- 1 | ###################################### 2 | # 3 | # RoboPeak USB LCD Display Linux Driver 4 | # 5 | # Copyright (C) 2009 - 2013 RoboPeak Team 6 | # This file is licensed under the GPL. See LICENSE in the package. 7 | # 8 | # http://www.robopeak.net 9 | # 10 | # Author Shikai Chen 11 | # 12 | ###################################### 13 | 14 | 15 | DRIVER_NAME := rp_usbdisplay 16 | 17 | EXTRA_CFLAGS += -I$(PWD)/src -I$(PWD)/../common 18 | 19 | obj-$(CONFIG_FB_RPUSBDISP) := $(DRIVER_NAME).o 20 | 21 | DRIVER_FILES := src/main.o \ 22 | src/usbhandlers.o \ 23 | src/fbhandlers.o \ 24 | src/touchhandlers.o 25 | 26 | $(DRIVER_NAME)-objs:= $(DRIVER_FILES) 27 | 28 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./stop.sh 3 | #cp rp_usbdisplay.ko /lib/modules/`uname -r`/ 4 | modprobe rp_usbdisplay 5 | echo 1 > /sys/class/vtconsole/vtcon1/bind 6 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/inc/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * ---------------------------------------------------------------------- 12 | * Common Includes 13 | * 14 | */ 15 | 16 | #ifndef _COMMON_INCLUDE_H 17 | #define _COMMON_INCLUDE_H 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "inc/types.h" 39 | #include "inc/drvconf.h" 40 | #include "inc/devconf.h" 41 | 42 | 43 | #include "inc/protocol.h" 44 | 45 | extern int fps; 46 | 47 | // object predefine 48 | 49 | struct rpusbdisp_dev; 50 | 51 | #ifndef err 52 | #define err(format,arg...) printk(KERN_ERR format, ## arg) 53 | #endif 54 | 55 | #ifndef info 56 | #define info(format,arg...) printk(KERN_ERR format, ## arg) 57 | #endif 58 | 59 | 60 | #endif 61 | 62 | 63 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/inc/devconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * --------------------------------------------------- 12 | * Device Configurations 13 | */ 14 | 15 | #ifndef _DEVICE_CONF_H 16 | #define _DEVICE_CONF_H 17 | 18 | #define RP_DISP_DRIVER_NAME "rp-usbdisp" 19 | 20 | #define RP_DISP_USB_VENDOR_ID 0x303a // RP Pseudo vendor id 21 | #define RP_DISP_USB_PRODUCT_ID 0x1986 22 | #if 0 23 | #define RP_DISP_DEFAULT_HEIGHT (1080) 24 | #define RP_DISP_DEFAULT_WIDTH (1920) 25 | 26 | #else 27 | #define RP_DISP_DEFAULT_HEIGHT (240) 28 | #define RP_DISP_DEFAULT_WIDTH (320) 29 | 30 | 31 | #endif 32 | //#define PIXEL_32BIT 33 | #ifdef PIXEL_32BIT 34 | #define RP_DISP_DEFAULT_PIXEL_BITS 32 35 | typedef _u32 pixel_type_t; 36 | 37 | #else 38 | #define RP_DISP_DEFAULT_PIXEL_BITS 16 39 | typedef _u16 pixel_type_t; 40 | 41 | #endif 42 | 43 | #define RP_DISP_FEATURE_RLE_FWVERSION 0x0104 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/inc/drvconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * --------------------------------------------------- 12 | * Driver Configurations 13 | */ 14 | 15 | #ifndef _DRIVER_CONF_H 16 | #define _DRIVER_CONF_H 17 | 18 | 19 | #define DRIVER_LICENSE_INFO "GPL" 20 | #define DRIVER_VERSION "RoboPeak USB Display Driver Version 1.00" 21 | 22 | #define RPUSBDISP_MINOR 300 23 | 24 | #define RPUSBDISP_STATUS_QUERY_RETRY_COUNT 4 25 | 26 | 27 | #define RPUSBDISP_MAX_TRANSFER_SIZE (PAGE_SIZE*16 - 512) 28 | #define RPUSBDISP_MAX_TRANSFER_TICKETS_COUNT 4 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/inc/fbhandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * --------------------------------------------------- 12 | * Definition of Frame Buffer Handlers 13 | */ 14 | 15 | #ifndef _RPUSBDISP_FBHANDLERS_H 16 | #define _RPUSBDISP_FBHANDLERS_H 17 | 18 | 19 | int register_fb_handlers(void); 20 | void unregister_fb_handlers(void); 21 | 22 | 23 | int fbhandler_on_new_device(struct rpusbdisp_dev * dev); 24 | void fbhandler_on_remove_device(struct rpusbdisp_dev * dev); 25 | void fbhandler_on_all_transfer_done(struct rpusbdisp_dev * dev); 26 | 27 | void fbhandler_set_unsync_flag(struct rpusbdisp_dev * dev); 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/inc/touchhandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * --------------------------------------------------- 12 | * Definition of Touch Event Handlers 13 | */ 14 | 15 | #ifndef _RPUSBDISP_TOUCH_HANDLERS_H 16 | #define _RPUSBDISP_TOUCH_HANDLERS_H 17 | 18 | 19 | int register_touch_handler(void); 20 | void unregister_touch_handler(void); 21 | 22 | 23 | int touchhandler_on_new_device(struct rpusbdisp_dev * dev); 24 | void touchhandler_on_remove_device(struct rpusbdisp_dev * dev); 25 | 26 | void touchhandler_send_ts_event(struct rpusbdisp_dev * dev, int x, int y, int touch); 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/inc/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * ---------------------------------------------------------------------- 12 | * Unified Type Def 13 | * 14 | */ 15 | 16 | #ifndef RPDRIVER_TYPE_H 17 | #define RPDRIVER_TYPE_H 18 | 19 | 20 | typedef __u8 _u8; 21 | typedef __u16 _u16; 22 | typedef __u32 _u32; 23 | typedef __u64 _u64; 24 | 25 | typedef __s8 _s8; 26 | typedef __s16 _s16; 27 | typedef __s32 _s32; 28 | typedef __s64 _s64; 29 | 30 | #endif -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/inc/usbhandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * --------------------------------------------------- 12 | * Definition of USB Driver Handlers 13 | */ 14 | 15 | #ifndef _DRIVER_HANDLER_H 16 | #define _DRIVER_HANDLER_H 17 | 18 | int register_usb_handlers(void); 19 | void unregister_usb_handlers(void); 20 | 21 | int rpusbdisp_usb_get_device_count(void); 22 | 23 | struct device * rpusbdisp_usb_get_devicehandle(struct rpusbdisp_dev *); 24 | void rpusbdisp_usb_set_fbhandle(struct rpusbdisp_dev *, void *); 25 | void * rpusbdisp_usb_get_fbhandle(struct rpusbdisp_dev * dev); 26 | 27 | void rpusbdisp_usb_set_touchhandle(struct rpusbdisp_dev * dev, void *); 28 | void * rpusbdisp_usb_get_touchhandle(struct rpusbdisp_dev * dev); 29 | 30 | int rpusbdisp_usb_try_send_image(struct rpusbdisp_dev * dev, const pixel_type_t * framebuffer, int x, int y, int right, int bottom, int line_width, int clear_dirty); 31 | int rpusbdisp_usb_try_draw_rect(struct rpusbdisp_dev * dev, int x, int y, int right, int bottom, pixel_type_t color, int operation); 32 | int rpusbdisp_usb_try_copy_area(struct rpusbdisp_dev * dev, int sx, int sy, int dx, int dy, int width, int height); 33 | 34 | #endif -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | */ 12 | 13 | 14 | #include "inc/common.h" 15 | #include "inc/usbhandlers.h" 16 | #include "inc/fbhandlers.h" 17 | #include "inc/touchhandlers.h" 18 | 19 | 20 | 21 | #if 0 22 | static const struct file_operations lcd_fops = { 23 | .owner = THIS_MODULE, 24 | .read = lcd_read, 25 | .write = lcd_write, 26 | .open = lcd_open, 27 | .unlocked_ioctl = lcd_ioctl, 28 | .release = lcd_release, 29 | .llseek = noop_llseek, 30 | }; 31 | 32 | /* 33 | * usb class driver info in order to get a minor number from the usb core, 34 | * and to have the device registered with the driver core 35 | */ 36 | static struct usb_class_driver lcd_class = { 37 | .name = "usbdisp%d", 38 | .fops = &lcd_fops, 39 | .minor_base = USBLCD_MINOR, 40 | }; 41 | #endif 42 | 43 | int fps = 0; 44 | module_param(fps, int, 0); 45 | MODULE_PARM_DESC(fps, "Specify the frame rate used to refresh the display (override kernel config)"); 46 | 47 | 48 | 49 | static int __init usb_disp_init(void) 50 | { 51 | int result; 52 | 53 | if(fps == 0) { 54 | /* frame rate is not set through the modprobe command. Use the value defined in the .config */ 55 | 56 | 57 | /* Just in case for background compliance. Maybe the Kconfig file of the driver is not integrated */ 58 | fps = 20; 59 | 60 | } 61 | printk("fps %d\n", fps); 62 | do { 63 | #if 0 64 | result = register_touch_handler(); 65 | if(result) { 66 | err("touch_handler failed. Error number %d", result); 67 | break; 68 | } 69 | #endif 70 | #if 0 71 | result = register_fb_handlers(); 72 | if(result) { 73 | err("fb handler register failed. Error number %d", result); 74 | break; 75 | } 76 | #endif 77 | result = register_usb_handlers(); 78 | if(result) { 79 | err("usb_register failed. Error number %d", result); 80 | break; 81 | } 82 | 83 | 84 | 85 | } while(0); 86 | 87 | return result; 88 | } 89 | 90 | 91 | static void __exit usb_disp_exit(void) 92 | { 93 | unregister_usb_handlers(); 94 | //unregister_fb_handlers(); 95 | // unregister_touch_handler(); 96 | } 97 | 98 | module_init(usb_disp_init); 99 | module_exit(usb_disp_exit); 100 | 101 | 102 | MODULE_AUTHOR("Shikai Chen "); 103 | MODULE_DESCRIPTION(DRIVER_VERSION); 104 | MODULE_LICENSE(DRIVER_LICENSE_INFO); 105 | 106 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/src/touchhandlers.c: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak USB LCD Display Linux Driver 3 | * 4 | * Copyright (C) 2009 - 2013 RoboPeak Team 5 | * This file is licensed under the GPL. See LICENSE in the package. 6 | * 7 | * http://www.robopeak.net 8 | * 9 | * Author Shikai Chen 10 | * 11 | * --------------------------------------------------- 12 | * Touch Event Handlers 13 | */ 14 | 15 | 16 | #include "inc/common.h" 17 | #include "inc/touchhandlers.h" 18 | #include "inc/usbhandlers.h" 19 | 20 | static struct input_dev * _default_input_dev; 21 | static volatile int _live_flag; 22 | 23 | static int _on_create_input_dev(struct input_dev ** inputdev) 24 | { 25 | *inputdev = input_allocate_device(); 26 | 27 | if(!inputdev) { 28 | return -ENOMEM; 29 | } 30 | 31 | (*inputdev)->evbit[0] = BIT(EV_SYN) | BIT(EV_KEY) | BIT(EV_ABS); 32 | 33 | (*inputdev)->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); 34 | 35 | 36 | input_set_abs_params((*inputdev), ABS_X, 0, RP_DISP_DEFAULT_WIDTH, 0, 0); 37 | input_set_abs_params((*inputdev), ABS_Y, 0, RP_DISP_DEFAULT_HEIGHT, 0, 0); 38 | input_set_abs_params((*inputdev), ABS_PRESSURE, 0, 1, 0, 0); 39 | 40 | (*inputdev)->name = "RoboPeakUSBDisplayTS"; 41 | (*inputdev)->id.bustype = BUS_USB; 42 | 43 | return input_register_device((*inputdev)); 44 | } 45 | 46 | static void _on_release_input_dev(struct input_dev * inputdev) 47 | { 48 | 49 | input_unregister_device(inputdev); 50 | } 51 | 52 | 53 | int __init register_touch_handler(void) 54 | { 55 | int ret = _on_create_input_dev(&_default_input_dev); 56 | if(!ret) _live_flag = 1; 57 | return ret; 58 | } 59 | 60 | void unregister_touch_handler(void) 61 | { 62 | _live_flag = 0; 63 | _on_release_input_dev(_default_input_dev); 64 | _default_input_dev = NULL; 65 | } 66 | 67 | 68 | int touchhandler_on_new_device(struct rpusbdisp_dev * dev) 69 | { 70 | // singleton design 71 | return 0; 72 | } 73 | 74 | void touchhandler_on_remove_device(struct rpusbdisp_dev * dev) 75 | { 76 | // singleton design 77 | } 78 | 79 | 80 | void touchhandler_send_ts_event(struct rpusbdisp_dev * dev, int x, int y, int touch) 81 | { 82 | if(!_default_input_dev || !_live_flag) return; 83 | if(touch) { 84 | input_report_abs(_default_input_dev, ABS_X, x); 85 | input_report_abs(_default_input_dev, ABS_Y, y); 86 | input_report_abs(_default_input_dev, ABS_PRESSURE, 1); 87 | input_report_key(_default_input_dev, BTN_TOUCH, 1); 88 | 89 | input_sync(_default_input_dev); 90 | } else { 91 | input_report_abs(_default_input_dev, ABS_PRESSURE, 0); 92 | input_report_key(_default_input_dev, BTN_TOUCH, 0); 93 | input_sync(_default_input_dev); 94 | } 95 | } -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo 0 > /sys/class/vtconsole/vtcon1/bind 3 | rmmod rp_usbdisplay 4 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/xserver_conf/10-disp.conf: -------------------------------------------------------------------------------- 1 | Section "Device" 2 | Identifier "RPUSBDispFB" 3 | Driver "fbdev" 4 | Option "fbdev" "/dev/fb1" 5 | EndSection 6 | 7 | Section "Monitor" 8 | Identifier "RPUSBDispMonitor" 9 | EndSection 10 | 11 | Section "Screen" 12 | Identifier "RPUSBDisp" 13 | Device "RPUSBDispFB" 14 | Monitor "RPUSBDispMonitor" 15 | DefaultFbBpp 16 16 | SubSection "Display" 17 | Visual "TrueColor" 18 | EndSubSection 19 | EndSection 20 | 21 | 22 | Section "InputClass" 23 | Identifier "RPUSBTouch" 24 | MatchDevicePath "/dev/input/event*" 25 | Driver "evdev" 26 | EndSection 27 | 28 | Section "Device" 29 | Identifier "intelDispFB" 30 | Driver "intel" 31 | Option "fbdev" "/dev/fb0" 32 | EndSection 33 | 34 | Section "Monitor" 35 | Identifier "intelMonitor" 36 | EndSection 37 | 38 | Section "Screen" 39 | Identifier "intelDisp" 40 | Device "intelDispFB" 41 | Monitor "intelMonitor" 42 | DefaultFbBpp 32 43 | SubSection "Display" 44 | Visual "TrueColor" 45 | EndSubSection 46 | EndSection 47 | 48 | Section "ServerLayout" 49 | Identifier "Main Layout" 50 | Screen "RPUSBDisp" RightOf "intelDisp" 51 | Screen "intelDisp" 52 | EndSection 53 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/xserver_conf/10-intel.conf: -------------------------------------------------------------------------------- 1 | Section "Device" 2 | Identifier "intelDispFB" 3 | Driver "intel" 4 | Option "intel" "/dev/fb0" 5 | EndSection 6 | 7 | Section "Screen" 8 | Identifier "intelDisp" 9 | Device "intelDispFB" 10 | DefaultFbBpp 32 11 | SubSection "Display" 12 | Visual "TrueColor" 13 | EndSubSection 14 | EndSection 15 | 16 | 17 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/xserver_conf/10-rpi.conf: -------------------------------------------------------------------------------- 1 | Section "Device" 2 | Identifier "RPUSBDispFB" 3 | Driver "fbdev" 4 | Option "fbdev" "/dev/fb1" 5 | EndSection 6 | 7 | Section "Monitor" 8 | Identifier "RPUSBDispMonitor" 9 | EndSection 10 | 11 | Section "Screen" 12 | Identifier "RPUSBDisp" 13 | Device "RPUSBDispFB" 14 | Monitor "RPUSBDispMonitor" 15 | DefaultFbBpp 16 16 | SubSection "Display" 17 | Visual "TrueColor" 18 | EndSubSection 19 | EndSection 20 | 21 | 22 | Section "InputClass" 23 | Identifier "RPUSBTouch" 24 | MatchDevicePath "/dev/input/event*" 25 | Driver "evdev" 26 | EndSection 27 | 28 | Section "Device" 29 | Identifier "DefaultDispFB" 30 | Driver "fbdev" 31 | Option "fbdev" "/dev/fb0" 32 | EndSection 33 | 34 | Section "Monitor" 35 | Identifier "DefaultMonitor" 36 | EndSection 37 | 38 | Section "Screen" 39 | Identifier "DefaultDisp" 40 | Device "DefaultDispFB" 41 | Monitor "DefaultMonitor" 42 | DefaultFbBpp 32 43 | SubSection "Display" 44 | Visual "TrueColor" 45 | EndSubSection 46 | EndSection 47 | 48 | Section "ServerLayout" 49 | Identifier "Main Layout" 50 | Screen "RPUSBDisp" RightOf "DefaultDisp" 51 | Screen "DefaultDisp" 52 | EndSection 53 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/linux-driver/xserver_conf/README: -------------------------------------------------------------------------------- 1 | copy the file to /usr/share/X11/xorg.conf.d on Ubuntu system 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | Win32 2 | Release 3 | Debug 4 | *.ipch 5 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/Makefile.conf.in: -------------------------------------------------------------------------------- 1 | # Make Options generated by configure 2 | 3 | PREFIX:=@prefix@ 4 | OPT_DBG?=@OPT_DBG@ 5 | ARCH_PLATFORM:=@ARCH_PLATFORM@ 6 | COMPILE_PREFIX:=@COMPILER_PREFIX@ 7 | 8 | CC:=@CC@ 9 | CXX:=@CXX@ 10 | LINK:=@CXX@ 11 | AR:=@AR@ 12 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/Makefile.in: -------------------------------------------------------------------------------- 1 | # VFD Demo System 2 | # By CSK 3 | # 4 | 5 | 6 | # NOTE: do not alter the order of the folders, they are arranged based on the dependencies 7 | SUBDIRS:= infra \ 8 | deps-wraps \ 9 | rpusbdisp-drv \ 10 | demo 11 | 12 | 13 | .PHONY: all clean install listsubs 14 | 15 | listsubs: 16 | @for subdir in $(SUBDIRS) ; do $(MAKE) -C $$subdir $(MAKECMDGOALS) || exit 1; done 17 | 18 | all: listsubs 19 | 20 | clean: listsubs 21 | 22 | install: listsubs 23 | 24 | distclean: 25 | $(MAKE) clean 26 | rm -r -f config.log config.status Makefile Makefile.conf 27 | rm -r -f .obj .output 28 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/Makefile.prev: -------------------------------------------------------------------------------- 1 | PREFIX:=/usr/lib/ 2 | 3 | CPPFLAGS+=--std c++11 4 | INFRA_SOURCE=$(wildcard infra/src/util/*.cc) 5 | INFRA_OBJECT=$(patsubst %.cc,%.o,$(INFRA_SOURCE)) 6 | 7 | LIBUSBX_WRAP_SOURCE=$(wildcard deps-wraps/libusbx_wrap/src/*.cc) 8 | LIBUSBX_WRAP_OBJ=$(patsubst %.cc,%.o,${LIBUSBX_WRAP_SOURCE}) 9 | 10 | LIBRPUSBDISP_DRV_SOURCE=$(wildcard rpusbdisp-drv/src/*.cc) 11 | LIBRPUSBDISP_DRV_OBJ=$(patsubst %.cc,%.o,${LIBRPUSBDISP_DRV_SOURCE}) 12 | 13 | RPUSBDISPDEMO_SRC=$(wildcard demo/src/*.cc) 14 | RPUSBDISPDEMO_OBJ=$(patsubst %.cc,%.o,${RPUSBDISPDEMO_SRC}) 15 | 16 | .phony: all clean distclean document 17 | 18 | all: build/rpusbdispdemo 19 | 20 | clean: 21 | rm -rf build 22 | 23 | distclean: 24 | rm -rf build 25 | find . -name "*.o" | xargs rm -rf 26 | 27 | build/libinfra.a: $(INFRA_OBJECT) 28 | mkdir -p build 29 | $(AR) rc $@ $(INFRA_OBJECT) 30 | 31 | $(INFRA_OBJECT): $(INFRA_SOURCE) 32 | $(CXX) -c -o $@ $(CPPFLAGS) -Iinfra/include $(patsubst %.o,%.cc,$@) 33 | 34 | build/libdeps_wraps.a: build/deps_wraps/libusbxwrap.a 35 | cp $^ $@ 36 | 37 | build/deps_wraps/libusbxwrap.a: $(LIBUSBX_WRAP_OBJ) 38 | mkdir -p build/deps_wraps 39 | $(AR) rc $@ $(LIBUSBX_WRAP_OBJ) 40 | 41 | $(LIBUSBX_WRAP_OBJ):$(LIBUSBX_WRAP_SOURCE) 42 | $(CXX) -c -o $@ $(CPPFLAGS) -Iinfra/include -Ideps-wraps/libusbx_wrap/include -I/usr/local/include/libusb-1.0 -I/usr/include/libusb-1.0 $(patsubst %.o,%.cc,$@) 43 | 44 | build/librpusbdisp-drv.a: $(LIBRPUSBDISP_DRV_OBJ) 45 | mkdir -p build 46 | $(AR) rc $@ $(LIBRPUSBDISP_DRV_OBJ) 47 | 48 | $(LIBRPUSBDISP_DRV_OBJ): $(LIBRPUSBDISP_DRV_SOURCE) 49 | $(CXX) -c -o $@ $(CPPFLAGS) -Iinfra/include -Ideps-wraps/libusbx_wrap/include -Irpusbdisp-drv/include $(patsubst %.o,%.cc,$@) 50 | 51 | build/rpusbdispdemo: ${RPUSBDISPDEMO_OBJ} build/libinfra.a build/libdeps_wraps.a build/librpusbdisp-drv.a 52 | $(CXX) -o $@ ${RPUSBDISPDEMO_OBJ} $(CPPFLAGS) -Lbuild -L/usr/local/lib -L/usr/lib -lrpusbdisp-drv -ldeps_wraps -linfra -lusb-1.0 53 | 54 | ${RPUSBDISPDEMO_OBJ}: ${RPUSBDISPDEMO_SRC} 55 | $(CXX) -c -o $@ $(CPPFLAGS) -Iinfra/include -Ideps-wraps/libusbx_wrap/include -Irpusbdisp-drv/include $(patsubst %.o,%.cc,$@) 56 | 57 | document: 58 | doxygen Doxygen 59 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.61]) 5 | AC_INIT(edison_native_playground, 0.1, http://www.csksoft.net) 6 | 7 | AC_SYS_LARGEFILE 8 | 9 | # Checks for programs. 10 | AC_PROG_CXX 11 | AC_PROG_CC 12 | AC_PROG_RANLIB 13 | AC_PATH_PROG(AR,ar,ar) 14 | 15 | # Checks for libraries. 16 | 17 | # Checks for header files. 18 | AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/time.h unistd.h]) 19 | 20 | # Checks for typedefs, structures, and compiler characteristics. 21 | AC_HEADER_STDBOOL 22 | AC_C_INLINE 23 | AC_TYPE_PID_T 24 | AC_TYPE_SIZE_T 25 | AC_TYPE_UINT32_T 26 | AC_TYPE_UINT64_T 27 | AC_TYPE_UINT8_T 28 | 29 | 30 | # check target platform via current machine type 31 | machine=`uname -m` 32 | if test x$machine = xarmv7l; then 33 | ARCH_PLATFORM=armv7l 34 | else 35 | ARCH_PLATFORM=x86 36 | fi 37 | 38 | # check target platform type based on the host arch 39 | 40 | case "$host" in 41 | arm-*-*) 42 | ARCH_PLATFORM=armv7l 43 | ;; 44 | *86* ) 45 | ARCH_PLATFORM=x86 46 | ;; 47 | esac 48 | 49 | AC_SUBST(ARCH_PLATFORM) 50 | 51 | COMPILER_PREFIX=$host 52 | AC_SUBST(COMPILER_PREFIX) 53 | 54 | 55 | 56 | # enable debug 57 | AC_MSG_CHECKING(for debug) 58 | AC_ARG_ENABLE([debug], 59 | [AC_HELP_STRING([--enable-debug], 60 | [Turn off optimization flag and Turn on debug flag. (DEFINE _DEBUG)(default=disable)])], 61 | [OPT_DBG="$enableval"], 62 | [OPT_DBG=no] ) 63 | 64 | AC_SUBST(OPT_DBG) 65 | 66 | # Checks for library functions. 67 | AC_FUNC_FORK 68 | AC_CHECK_FUNCS([clock_gettime ftruncate gettimeofday memset usleep]) 69 | 70 | AC_CONFIG_FILES([Makefile.conf 71 | Makefile]) 72 | AC_OUTPUT 73 | 74 | 75 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/demo/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Unified Building System for Linux 3 | # By CSK (csk@live.com) 4 | # 5 | 6 | PRJ_ROOT:=.. 7 | MOD_NAME:=rpusbdispdemo 8 | 9 | include $(PRJ_ROOT)/scripts/def.mak 10 | 11 | 12 | CSRC = $(shell find . -name "*.c") 13 | CXXCCSRC= $(shell find . -name "*.cc") 14 | 15 | EXTRA_FLAGS:=-Wno-deprecated 16 | CDEFS+= 17 | DEP_AR+= 18 | 19 | DEP_LIBS+= $(RPUSBDISP_LIBS) 20 | 21 | INCLUDES+= 22 | 23 | 24 | all: $(EXEC_DEST) 25 | additional_clean: 26 | rm -f $(EXEC_DEST) 27 | 28 | install: $(EXEC_DEST) 29 | install -m 0755 $(EXEC_DEST) $(PREFIX)/bin 30 | 31 | include $(PRJ_ROOT)/scripts/common.mak 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/Makefile: -------------------------------------------------------------------------------- 1 | # VFD Demo System 2 | # By CSK 3 | # 4 | 5 | 6 | # NOTE: do not alter the order of the folders, they are arranged based on the dependencies 7 | SUBDIRS:= libusbx_wrap 8 | 9 | 10 | 11 | .PHONY: all clean install listsubs 12 | 13 | listsubs: 14 | @for subdir in $(SUBDIRS) ; do $(MAKE) -C $$subdir $(MAKECMDGOALS) || exit 1; done 15 | 16 | all: listsubs 17 | 18 | clean: listsubs 19 | 20 | install: listsubs 21 | 22 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Unified Building System for Linux 3 | # By CSK (csk@live.com) 4 | # 5 | 6 | PRJ_ROOT:=../.. 7 | MOD_NAME:=usbxwrap 8 | 9 | include $(PRJ_ROOT)/scripts/def.mak 10 | 11 | 12 | CSRC:= $(shell find src -name "*.c") 13 | CXXCCSRC:= $(shell find src -name "*.cc") 14 | 15 | 16 | 17 | EXTRA_FLAGS:=-Wno-deprecated 18 | CDEFS+= 19 | DEP_AR+= 20 | 21 | INCLUDES+= -Iinclude -I$(PREFIX)/include/libusb-1.0 22 | 23 | all: $(STATIC_DEST) 24 | additional_clean: 25 | rm -f $(STATIC_DEST) 26 | 27 | install: 28 | tar cf - include | (cd $(PREFIX); tar xf -) 29 | 30 | 31 | include $(PRJ_ROOT)/scripts/common.mak 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/context.h: -------------------------------------------------------------------------------- 1 | // 2 | // context.h 3 | // A C++ wrap for libusbx context 4 | // 5 | // Created by Tony Huang on 12/7/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace rp 16 | { 17 | namespace deps 18 | { 19 | namespace libusbx_wrap 20 | { 21 | 22 | class ContextImpl; 23 | class DeviceList; 24 | class Device; 25 | class Pipeline; 26 | class PipelineImpl; 27 | 28 | class Context : public std::enable_shared_from_this, public rp::util::noncopyable 29 | { 30 | private: 31 | Context(); 32 | 33 | public: 34 | ~Context(); 35 | 36 | std::shared_ptr getDeviceList(); 37 | std::vector > lookupDevices(uint16_t vid, uint16_t pid); 38 | 39 | std::shared_ptr summonPipeline(); 40 | 41 | void poll(); 42 | 43 | static std::shared_ptr defaultContext(); 44 | 45 | private: 46 | static void createDefaultContext_(); 47 | std::unique_ptr impl_; 48 | }; 49 | 50 | class Pipeline : public std::enable_shared_from_this, public rp::util::noncopyable 51 | { 52 | public: 53 | Pipeline(std::shared_ptr context); 54 | ~Pipeline(); 55 | 56 | void start(); 57 | 58 | private: 59 | std::unique_ptr impl_; 60 | }; 61 | 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/device.h: -------------------------------------------------------------------------------- 1 | // 2 | // device.h 3 | // A usb device in libusb 4 | // 5 | // Created by Tony Huang on 12/7/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | 14 | extern "C" { 15 | struct libusb_device; 16 | } 17 | 18 | namespace rp 19 | { 20 | namespace deps 21 | { 22 | namespace libusbx_wrap 23 | { 24 | 25 | class DeviceHandle; 26 | class DeviceImpl; 27 | 28 | class Device : public std::enable_shared_from_this, public rp::util::noncopyable 29 | { 30 | public: 31 | Device(libusb_device*); 32 | ~Device(); 33 | 34 | std::shared_ptr open(); 35 | 36 | uint16_t getVid(); 37 | uint16_t getPid(); 38 | uint8_t getNameIndex(); 39 | uint8_t getSerialNumberIndex(); 40 | int getMaxPacketSize(uint8_t endpoint); 41 | uint16_t getFirmwareVersion(); 42 | 43 | private: 44 | std::unique_ptr impl_; 45 | }; 46 | 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/device_handle.h: -------------------------------------------------------------------------------- 1 | // 2 | // device_handle.h 3 | // Device handle 4 | // 5 | // Created by Tony Huang on 12/9/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | extern "C" { 17 | struct libusb_device_handle; 18 | } 19 | 20 | namespace rp 21 | { 22 | namespace deps 23 | { 24 | namespace libusbx_wrap 25 | { 26 | 27 | class DeviceHandleImpl; 28 | class Device; 29 | class Transfer; 30 | 31 | class DeviceHandle : public std::enable_shared_from_this, public rp::util::noncopyable 32 | { 33 | public: 34 | DeviceHandle(std::shared_ptr device, libusb_device_handle* deviceHandle); 35 | ~DeviceHandle(); 36 | 37 | std::string getName(); 38 | std::string getSerialNumber(); 39 | 40 | void claimInterface(int usbInterface); 41 | void releaseInterface(int usbInterface); 42 | 43 | void clearEndpointHalt(uint8_t endpoint); 44 | 45 | std::shared_ptr getDevice(); 46 | 47 | std::shared_ptr allocTransfer(EndpointDirection dir, EndpointTransferType type, uint8_t endpoint); 48 | 49 | private: 50 | std::unique_ptr impl_; 51 | }; 52 | 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/device_list.h: -------------------------------------------------------------------------------- 1 | // 2 | // device_list.h 3 | // Device list 4 | // 5 | // Created by Tony Huang on 12/7/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | 14 | extern "C" { 15 | struct libusb_device; 16 | } 17 | 18 | namespace rp 19 | { 20 | namespace deps 21 | { 22 | namespace libusbx_wrap 23 | { 24 | 25 | class DeviceListImpl; 26 | class Device; 27 | 28 | class DeviceList : public rp::util::noncopyable 29 | { 30 | public: 31 | DeviceList(size_t, libusb_device**); 32 | ~DeviceList(); 33 | 34 | std::shared_ptr getDevice(size_t index); 35 | size_t count() const; 36 | 37 | private: 38 | std::unique_ptr impl_; 39 | }; 40 | 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/enums.h: -------------------------------------------------------------------------------- 1 | // 2 | // enums.h 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/10/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | namespace rp 12 | { 13 | namespace deps 14 | { 15 | namespace libusbx_wrap 16 | { 17 | 18 | enum EndpointDirection { 19 | EndpointDirectionIn = 0x80, 20 | EndpointDirectionOut = 0x00 21 | }; 22 | 23 | enum EndpointTransferType { 24 | EndpointTransferTypeControl = 0, 25 | EndpointTransferTypeIsochronous = 1, 26 | EndpointTransferTypeBulk = 2, 27 | EndpointTransferTypeInterrupt = 3 28 | }; 29 | 30 | enum TransferStatus { 31 | TransferStatusUnknown = 0, 32 | TransferStatusCompleted = 1, 33 | TransferStatusCancelled = 2, 34 | TransferStatusError = 3, 35 | TransferStatusTimeout = 4, 36 | TransferStatusStall = 5, 37 | TransferStatusDeviceError = 6, 38 | TransferStatusOverflow = 7 39 | }; 40 | 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/libusbx_wrap.h: -------------------------------------------------------------------------------- 1 | // 2 | // libusbx_wrap.h 3 | // Overall header file to make it easier to use 4 | // 5 | // Created by Tony Huang on 12/11/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | namespace rp 22 | { 23 | namespace deps 24 | { 25 | namespace libusbx_wrap 26 | { 27 | 28 | template 29 | static T decodeAs(std::shared_ptr transfer) 30 | { 31 | std::shared_ptr transferBuffer(new rp::util::Buffer(*transfer->getTransferBuffer())); 32 | rp::util::BufferLockScope lockScope(transferBuffer); 33 | 34 | T output; 35 | memcpy(&output, lockScope.getBuffer(), sizeof(T)); 36 | 37 | return output; 38 | } 39 | 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/scopes.h: -------------------------------------------------------------------------------- 1 | // 2 | // scopes.h 3 | // Scopes 4 | // 5 | // Created by Tony Huang on 12/10/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | 14 | namespace rp 15 | { 16 | namespace deps 17 | { 18 | namespace libusbx_wrap 19 | { 20 | 21 | class DeviceHandle; 22 | 23 | class InterfaceScopeImpl; 24 | 25 | class InterfaceScope : public rp::util::noncopyable 26 | { 27 | public: 28 | InterfaceScope(std::shared_ptr device, int usbInterface); 29 | ~InterfaceScope(); 30 | 31 | private: 32 | std::unique_ptr impl_; 33 | }; 34 | 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/include/rp/deps/libusbx_wrap/transfer.h: -------------------------------------------------------------------------------- 1 | // 2 | // transfer.h 3 | // Wrap of libusb_transfer* apis 4 | // 5 | // Created by Tony Huang on 12/10/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | extern "C" { 16 | struct libusb_transfer; 17 | } 18 | 19 | namespace rp 20 | { 21 | namespace util 22 | { 23 | 24 | class Buffer; 25 | 26 | } 27 | } 28 | 29 | namespace rp 30 | { 31 | namespace deps 32 | { 33 | namespace libusbx_wrap 34 | { 35 | 36 | class DeviceHandle; 37 | class TransferImpl; 38 | 39 | class Transfer : public rp::util::noncopyable 40 | { 41 | public: 42 | Transfer(std::shared_ptr deviceHandle, libusb_transfer* transfer); 43 | ~Transfer(); 44 | 45 | void setTransferBuffer(std::shared_ptr buffer); 46 | std::shared_ptr getTransferBuffer(); 47 | 48 | void submit(); 49 | void waitForCompletion(); 50 | TransferStatus getStatus(); 51 | 52 | private: 53 | std::shared_ptr impl_; 54 | }; 55 | 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/src/device.cc: -------------------------------------------------------------------------------- 1 | // 2 | // device.cc 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/7/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace std; 15 | using namespace rp::util; 16 | 17 | namespace rp { namespace deps { namespace libusbx_wrap { 18 | 19 | class DeviceImpl : public rp::util::noncopyable { 20 | public: 21 | DeviceImpl(libusb_device* device) : device_(device) { 22 | libusb_ref_device(device); 23 | } 24 | 25 | ~DeviceImpl() { 26 | libusb_unref_device(device_); 27 | device_ = nullptr; 28 | } 29 | 30 | libusb_device_handle* open() { 31 | libusb_device_handle* handle; 32 | 33 | int result = libusb_open(device_, &handle); 34 | 35 | if (result < 0) { 36 | throw Exception(result); 37 | } 38 | 39 | return handle; 40 | } 41 | 42 | uint16_t getVid() { 43 | return getDescriptor().idVendor; 44 | } 45 | 46 | uint16_t getPid() { 47 | return getDescriptor().idProduct; 48 | } 49 | 50 | uint8_t getNameIndex() { 51 | return getDescriptor().iProduct; 52 | } 53 | 54 | uint8_t getSerialNumberIndex() { 55 | return getDescriptor().iSerialNumber; 56 | } 57 | 58 | uint16_t getFirmwareVersion() { 59 | return getDescriptor().bcdDevice; 60 | } 61 | 62 | int getMaxPacketSize(uint8_t endpoint) { 63 | return libusb_get_max_packet_size(device_, endpoint); 64 | } 65 | 66 | private: 67 | libusb_device_descriptor getDescriptor() { 68 | libusb_device_descriptor descriptor; 69 | 70 | int result = libusb_get_device_descriptor(device_, &descriptor); 71 | 72 | if (result) { 73 | throw Exception(result); 74 | } 75 | 76 | return descriptor; 77 | } 78 | 79 | libusb_device* device_; 80 | }; 81 | 82 | Device::Device(libusb_device* device) : impl_(new DeviceImpl(device)) {} 83 | Device::~Device() {} 84 | 85 | uint16_t Device::getVid() { 86 | return impl_->getVid(); 87 | } 88 | 89 | uint16_t Device::getPid() { 90 | return impl_->getPid(); 91 | } 92 | 93 | uint8_t Device::getNameIndex() { 94 | return impl_->getNameIndex(); 95 | } 96 | 97 | uint8_t Device::getSerialNumberIndex() { 98 | return impl_->getSerialNumberIndex(); 99 | } 100 | 101 | int Device::getMaxPacketSize(uint8_t endpoint) { 102 | return impl_->getMaxPacketSize(endpoint); 103 | } 104 | 105 | uint16_t Device::getFirmwareVersion() { 106 | return impl_->getFirmwareVersion(); 107 | } 108 | 109 | shared_ptr Device::open() { 110 | libusb_device_handle* handler = impl_->open(); 111 | 112 | return shared_ptr(new DeviceHandle(shared_from_this(), handler)); 113 | } 114 | 115 | }}} 116 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/src/device_list.cc: -------------------------------------------------------------------------------- 1 | // 2 | // device_list.cc 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/7/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | using namespace std; 15 | 16 | namespace rp { namespace deps { namespace libusbx_wrap { 17 | 18 | class DeviceListImpl : public rp::util::noncopyable { 19 | public: 20 | DeviceListImpl(size_t count, libusb_device** list) : size_(count), list_(list) {} 21 | ~DeviceListImpl() { 22 | libusb_free_device_list(list_, 1); 23 | list_ = 0; 24 | size_ = 0; 25 | } 26 | 27 | shared_ptr getDevice(size_t index) { 28 | if (index >= size_) { 29 | return shared_ptr(nullptr); 30 | } 31 | 32 | return shared_ptr(new Device(list_[index])); 33 | } 34 | 35 | size_t count() const { 36 | return size_; 37 | } 38 | 39 | private: 40 | size_t size_; 41 | libusb_device** list_; 42 | 43 | }; 44 | 45 | DeviceList::DeviceList(size_t count, libusb_device** list) : impl_(new DeviceListImpl(count, list)) {} 46 | DeviceList::~DeviceList() {} 47 | 48 | shared_ptr DeviceList::getDevice(size_t index) { 49 | return impl_->getDevice(index); 50 | } 51 | 52 | size_t DeviceList::count() const { 53 | return impl_->count(); 54 | } 55 | 56 | 57 | }}} 58 | 59 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/src/scopes.cc: -------------------------------------------------------------------------------- 1 | // 2 | // scopes.cc 3 | // Scopes 4 | // 5 | // Created by Tony Huang on 12/10/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | using namespace rp::util; 14 | 15 | namespace rp { namespace deps { namespace libusbx_wrap { 16 | 17 | class InterfaceScopeImpl : noncopyable { 18 | public: 19 | InterfaceScopeImpl(shared_ptr device, int usbInterface) : deviceHandle_(device), interface_(usbInterface) { 20 | device->claimInterface(usbInterface); 21 | } 22 | 23 | ~InterfaceScopeImpl() { 24 | deviceHandle_->releaseInterface(interface_); 25 | } 26 | 27 | private: 28 | std::shared_ptr deviceHandle_; 29 | int interface_; 30 | }; 31 | 32 | InterfaceScope::InterfaceScope(shared_ptr device, int usbInterface) : impl_(new InterfaceScopeImpl(device, usbInterface)) {} 33 | 34 | InterfaceScope::~InterfaceScope() {} 35 | 36 | }}} 37 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/src/transfer_buffer.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps-wraps/libusbx_wrap/src/transfer_buffer.cc -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngfix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngfix -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngstest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngstest -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngtest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngtest -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngunknown: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngunknown -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngvalid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/.libs/pngvalid -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Unified Building System for Linux 3 | # By CSK (csk@live.com) 4 | # 5 | 6 | PRJ_ROOT:=../.. 7 | MOD_NAME:=libpng 8 | 9 | include $(PRJ_ROOT)/scripts/def.mak 10 | 11 | 12 | CSRC:= $(shell find core -name "*.c") 13 | CXXSRC:= $(shell find core -name "*.cpp") 14 | 15 | EXTRA_FLAGS:=-Wno-deprecated 16 | CDEFS+= 17 | DEP_AR+= 18 | 19 | INCLUDES+= 20 | 21 | all: $(STATIC_DEST) 22 | additional_clean: 23 | rm -f $(STATIC_DEST) 24 | 25 | include $(PRJ_ROOT)/scripts/common.mak 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/arm/.deps/arm_init.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/arm/.deps/filter_neon.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/arm/.deps/filter_neon_intrinsics.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/libtests/.deps/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/libtests/.deps/.dirstamp -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/libtests/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/libtests/.dirstamp -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/tools/.deps/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/tools/.deps/.dirstamp -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/tools/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/contrib/tools/.dirstamp -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libpng-1.6.7/libpng-config: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # libpng-config 4 | # provides configuration info for libpng. 5 | 6 | # Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson 7 | 8 | # This code is released under the libpng license. 9 | # For conditions of distribution and use, see the disclaimer 10 | # and license in png.h 11 | 12 | # Modeled after libxml-config. 13 | 14 | version="1.6.7" 15 | prefix="/usr/local" 16 | exec_prefix="${prefix}" 17 | libdir="${exec_prefix}/lib" 18 | includedir="${prefix}/include/libpng16" 19 | libs="-lpng16" 20 | all_libs="-lpng16 -lz " 21 | I_opts="-I${includedir}" 22 | L_opts="-L${libdir}" 23 | R_opts="" 24 | cppflags="" 25 | ccopts="" 26 | ldopts="" 27 | 28 | usage() 29 | { 30 | cat < 2 | Copyright © 2007-2009 Daniel Drake 3 | Copyright © 2010-2012 Peter Stuge 4 | Copyright © 2008-2013 Nathan Hjelm 5 | Copyright © 2009-2013 Pete Batard 6 | Copyright © 2009-2013 Ludovic Rousseau 7 | Copyright © 2010-2012 Michael Plante 8 | Copyright © 2011-2013 Hans de Goede 9 | Copyright © 2012-2013 Martin Pieuchot 10 | Copyright © 2012-2013 Toby Gray 11 | 12 | Other contributors: 13 | Alan Ott 14 | Alan Stern 15 | Alex Vatchenko 16 | Anthony Clay 17 | Artem Egorkine 18 | Aurelien Jarno 19 | Bastien Nocera 20 | Benjamin Dobell 21 | Chris Dickens 22 | Colin Walters 23 | Dave Camarillo 24 | David Engraf 25 | David Moore 26 | Davidlohr Bueso 27 | Federico Manzan 28 | Felipe Balbi 29 | Florian Albrechtskirchinger 30 | Francesco Montorsi 31 | Graeme Gill 32 | Hans Ulrich Niedermann 33 | Hector Martin 34 | Hoi-Ho Chan 35 | Ilya Konstantinov 36 | James Hanko 37 | Konrad Rzepecki 38 | Lars Wirzenius 39 | Luca Longinotti 40 | Martin Koegler 41 | Matthias Bolte 42 | Mike Frysinger 43 | Mikhail Gusarov 44 | Nicholas Corgan 45 | Orin Eman 46 | Paul Fertser 47 | Pekka Nikander 48 | Rob Walker 49 | Sean McBride 50 | Sebastian Pipping 51 | Simon Haggett 52 | Thomas Röfer 53 | Tim Roberts 54 | Toby Peterson 55 | Trygve Laugstøl 56 | Uri Lublin 57 | Vasily Khoruzhick 58 | Vegard Storheil Eriksen 59 | Vitali Lovich 60 | Xiaofan Chen 61 | Zoltán Kovács 62 | Роман Донченко 63 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip 2 | ACLOCAL_AMFLAGS = -I m4 3 | DISTCLEANFILES = libusb-1.0.pc 4 | EXTRA_DIST = TODO PORTING msvc libusb/libusb-1.0.def libusb/version_nano.h \ 5 | examples/getopt/getopt.c examples/getopt/getopt1.c examples/getopt/getopt.h \ 6 | android Xcode 7 | SUBDIRS = libusb doc 8 | 9 | if BUILD_EXAMPLES 10 | SUBDIRS += examples 11 | endif 12 | 13 | if BUILD_TESTS 14 | SUBDIRS += tests 15 | endif 16 | 17 | pkgconfigdir=$(libdir)/pkgconfig 18 | pkgconfig_DATA=libusb-1.0.pc 19 | 20 | .PHONY: dist-up 21 | 22 | reldir = .release/$(distdir) 23 | dist-up: dist 24 | rm -rf $(reldir) 25 | mkdir -p $(reldir) 26 | cp $(distdir).tar.bz2 $(reldir) 27 | rsync -rv $(reldir) frs.sourceforge.net:/home/frs/project/l/li/libusb/libusb-1.0/ 28 | rm -rf $(reldir) 29 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/NEWS: -------------------------------------------------------------------------------- 1 | For the latest libusbx news, please refer to the ChangeLog file, or visit: 2 | http://libusbx.org 3 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/README: -------------------------------------------------------------------------------- 1 | libusbx 2 | ======= 3 | 4 | libusbx is a library for USB device access from Linux, Mac OS X, 5 | Windows and OpenBSD/NetBSD userspace, with OpenBSD/NetBSD, and to a 6 | lesser extent some of the newest features of Windows (such as libusbK 7 | and libusb-win32 driver support) being EXPERIMENTAL. 8 | It is written in C and licensed under the GNU Lesser General Public 9 | License version 2.1 or, at your option, any later version (see COPYING). 10 | 11 | libusbx is abstracted internally in such a way that it can hopefully 12 | be ported to other operating systems. Please see the PORTING file 13 | for more information. 14 | 15 | libusbx homepage: 16 | http://libusbx.org/ 17 | 18 | Developers will wish to consult the API documentation: 19 | http://api.libusbx.org 20 | 21 | Use the mailing list for questions, comments, etc: 22 | http://mailing-list.libusbx.org 23 | 24 | - Pete Batard 25 | - Hans de Goede 26 | - Xiaofan Chen 27 | - Ludovic Rousseau 28 | - Nathan Hjelm 29 | (Please use the mailing list rather than mailing developers directly) 30 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/TODO: -------------------------------------------------------------------------------- 1 | Please see the libusbx roadmap by visiting: 2 | https://github.com/libusbx/libusbx/issues/milestones?direction=asc&sort=due_date -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Xcode/common.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // libusbx Xcode configuration file 3 | // Copyright © 2012 Pete Batard 4 | // For more information, please visit: 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | // libusbx does not follow C99 strict aliasing rules, so disable it. 21 | GCC_STRICT_ALIASING = NO 22 | 23 | // Use C99 dialect. 24 | GCC_C_LANGUAGE_STANDARD = c99 25 | 26 | // Compiler warnings. 27 | CLANG_WARN_EMPTY_BODY = YES 28 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES 29 | GCC_WARN_ABOUT_RETURN_TYPE = YES 30 | GCC_WARN_UNINITIALIZED_AUTOS = YES 31 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES 32 | GCC_WARN_SHADOW = YES 33 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES 34 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES 35 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES 36 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES 37 | GCC_WARN_UNKNOWN_PRAGMAS = YES 38 | GCC_WARN_UNUSED_FUNCTION = YES 39 | GCC_WARN_UNUSED_LABEL = YES 40 | GCC_WARN_UNUSED_VARIABLE = YES 41 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Xcode/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Manually generated for Xcode. */ 2 | 3 | /* Default visibility */ 4 | #define DEFAULT_VISIBILITY /**/ 5 | 6 | /* Message logging */ 7 | #define ENABLE_LOGGING 1 8 | 9 | /* Define to 1 if you have the `gettimeofday' function. */ 10 | #define HAVE_GETTIMEOFDAY 1 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #define HAVE_POLL_H 1 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #define HAVE_SYS_TIME_H 1 17 | 18 | /* Darwin backend */ 19 | #define OS_DARWIN 1 20 | 21 | /* type of second poll() argument */ 22 | #define POLL_NFDS_TYPE nfds_t 23 | 24 | /* Use POSIX Threads */ 25 | #define THREADS_POSIX 1 26 | 27 | /* Use GNU extensions */ 28 | #define _GNU_SOURCE 1 29 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Xcode/debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // libusbx Xcode configuration file 3 | // Copyright © 2012 Pete Batard 4 | // For more information, please visit: 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | #include "common.xcconfig" 21 | 22 | // Embed debug symbols in binary itself. 23 | DEBUG_INFORMATION_FORMAT = dwarf 24 | 25 | // No optimizations in debug. 26 | GCC_OPTIMIZATION_LEVEL = 0 27 | 28 | // 29 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG=1 30 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Xcode/libusbx.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // libusbx Xcode configuration file 3 | // Copyright © 2012 Pete Batard 4 | // For more information, please visit: 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | // For backwards compatibility with libusb, use the same filename. 21 | PRODUCT_NAME = libusb-1.0.0 22 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Xcode/libusbx_debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // libusbx Xcode configuration file 3 | // Copyright © 2012 Pete Batard 4 | // For more information, please visit: 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | #include "debug.xcconfig" 21 | #include "libusbx.xcconfig" 22 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Xcode/libusbx_release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // libusbx Xcode configuration file 3 | // Copyright © 2012 Pete Batard 4 | // For more information, please visit: 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | #include "release.xcconfig" 21 | #include "libusbx.xcconfig" 22 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/Xcode/release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // libusbx Xcode configuration file 3 | // Copyright © 2012 Pete Batard 4 | // For more information, please visit: 5 | // 6 | // This library is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 2.1 of the License, or (at your option) any later version. 10 | // 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | // Lesser General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU Lesser General Public 17 | // License along with this library; if not, write to the Free Software 18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | #include "common.xcconfig" 21 | 22 | // Put debug symbols in separate .dym file. 23 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 24 | 25 | // Optimizations in release. 26 | GCC_OPTIMIZATION_LEVEL = s 27 | 28 | // Define NDEBUG so asserts go away in release. 29 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) NDEBUG=1 30 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/android/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Android build config for libusbx 3 | * Copyright © 2012-2013 RealVNC Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | /* Start with debug message logging enabled */ 21 | /* #undef ENABLE_DEBUG_LOGGING */ 22 | 23 | /* Message logging */ 24 | #define ENABLE_LOGGING 25 | 26 | /* Define to 1 if you have the header file. */ 27 | #define HAVE_DLFCN_H 1 28 | 29 | /* Define to 1 if you have the `gettimeofday' function. */ 30 | #define HAVE_GETTIMEOFDAY 1 31 | 32 | /* Define to 1 if you have the header file. */ 33 | #define HAVE_INTTYPES_H 1 34 | 35 | /* Linux backend */ 36 | #define OS_LINUX 1 37 | 38 | /* Enable output to system log */ 39 | #define USE_SYSTEM_LOGGING_FACILITY 1 40 | 41 | /* type of second poll() argument */ 42 | #define POLL_NFDS_TYPE nfds_t 43 | 44 | /* Use POSIX Threads */ 45 | #define THREADS_POSIX 1 46 | 47 | /* Default visibility */ 48 | #define DEFAULT_VISIBILITY __attribute__((visibility("default"))) 49 | 50 | /* Define to 1 if you have the header file. */ 51 | #define HAVE_MEMORY_H 1 52 | 53 | /* Define to 1 if you have the header file. */ 54 | #define HAVE_POLL_H 1 55 | 56 | /* Define to 1 if you have the header file. */ 57 | #define HAVE_SIGNAL_H 1 58 | 59 | /* Define to 1 if you have the header file. */ 60 | #define HAVE_SYS_STAT_H 1 61 | 62 | /* Define to 1 if you have the header file. */ 63 | #define HAVE_SYS_TIME_H 1 64 | 65 | /* Define to 1 if you have the header file. */ 66 | #define HAVE_SYS_TYPES_H 1 67 | 68 | /* Define to 1 if you have the header file. */ 69 | #define HAVE_UNISTD_H 1 70 | 71 | /* Define to 1 if you have the header file. */ 72 | #define HAVE_LINUX_FILTER_H 1 73 | 74 | /* Define to 1 if you have the header file. */ 75 | #define HAVE_LINUX_NETLINK_H 1 76 | 77 | /* Define to 1 if you have the header file. */ 78 | #define HAVE_ASM_TYPES_H 1 79 | 80 | /* Define to 1 if you have the header file. */ 81 | #define HAVE_SYS_SOCKET_H 1 82 | 83 | /* Add defines which Android is missing */ 84 | #ifndef TIMESPEC_TO_TIMEVAL 85 | #define TIMESPEC_TO_TIMEVAL(tv, ts) \ 86 | do { \ 87 | (tv)->tv_sec = (ts)->tv_sec; \ 88 | (tv)->tv_usec = (ts)->tv_nsec / 1000; \ 89 | } while (0) 90 | #endif 91 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/android/jni/Android.mk: -------------------------------------------------------------------------------- 1 | # Android build config for libusb, examples and tests 2 | # Copyright © 2012-2013 RealVNC Ltd. 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; either 7 | # version 2.1 of the License, or (at your option) any later version. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | LOCAL_PATH:= $(call my-dir) 20 | 21 | include $(LOCAL_PATH)/libusb.mk 22 | include $(LOCAL_PATH)/examples.mk 23 | include $(LOCAL_PATH)/tests.mk 24 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | # Android application build config for libusb 2 | # Copyright © 2012-2013 RealVNC Ltd. 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; either 7 | # version 2.1 of the License, or (at your option) any later version. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | APP_ABI := armeabi armeabi-v7a x86 20 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/android/jni/examples.mk: -------------------------------------------------------------------------------- 1 | # Android build config for libusb examples 2 | # Copyright © 2012-2013 RealVNC Ltd. 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; either 7 | # version 2.1 of the License, or (at your option) any later version. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | LOCAL_PATH:= $(call my-dir) 20 | LIBUSB_ROOT_REL:= ../.. 21 | LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../.. 22 | 23 | # listdevs 24 | 25 | include $(CLEAR_VARS) 26 | 27 | LOCAL_SRC_FILES := \ 28 | $(LIBUSB_ROOT_REL)/examples/listdevs.c 29 | 30 | LOCAL_C_INCLUDES += \ 31 | $(LIBUSB_ROOT_ABS) 32 | 33 | LOCAL_SHARED_LIBRARIES += libusb1.0 34 | 35 | LOCAL_MODULE:= listdevs 36 | 37 | include $(BUILD_EXECUTABLE) 38 | 39 | # xusb 40 | 41 | include $(CLEAR_VARS) 42 | 43 | LOCAL_SRC_FILES := \ 44 | $(LIBUSB_ROOT_REL)/examples/xusb.c 45 | 46 | LOCAL_C_INCLUDES += \ 47 | $(LIBUSB_ROOT_ABS) 48 | 49 | LOCAL_SHARED_LIBRARIES += libusb1.0 50 | 51 | LOCAL_MODULE:= xusb 52 | 53 | include $(BUILD_EXECUTABLE) 54 | 55 | # hotplugtest 56 | 57 | include $(CLEAR_VARS) 58 | 59 | LOCAL_SRC_FILES := \ 60 | $(LIBUSB_ROOT_REL)/examples/hotplugtest.c 61 | 62 | LOCAL_C_INCLUDES += \ 63 | $(LIBUSB_ROOT_ABS) 64 | 65 | LOCAL_SHARED_LIBRARIES += libusb1.0 66 | 67 | LOCAL_MODULE:= hotplugtest 68 | 69 | include $(BUILD_EXECUTABLE) 70 | 71 | # fxload 72 | 73 | include $(CLEAR_VARS) 74 | 75 | LOCAL_SRC_FILES := \ 76 | $(LIBUSB_ROOT_REL)/examples/fxload.c \ 77 | $(LIBUSB_ROOT_REL)/examples/ezusb.c 78 | 79 | LOCAL_C_INCLUDES += \ 80 | $(LIBUSB_ROOT_ABS) 81 | 82 | LOCAL_SHARED_LIBRARIES += libusb1.0 83 | 84 | LOCAL_MODULE:= fxload 85 | 86 | include $(BUILD_EXECUTABLE) 87 | 88 | # sam3u_benchmake 89 | 90 | include $(CLEAR_VARS) 91 | 92 | LOCAL_SRC_FILES := \ 93 | $(LIBUSB_ROOT_REL)/examples/sam3u_benchmark.c 94 | 95 | LOCAL_C_INCLUDES += \ 96 | $(LIBUSB_ROOT_ABS) 97 | 98 | LOCAL_SHARED_LIBRARIES += libusb1.0 99 | 100 | LOCAL_MODULE:= sam3u_benchmark 101 | 102 | include $(BUILD_EXECUTABLE) 103 | 104 | # dpfp 105 | 106 | include $(CLEAR_VARS) 107 | 108 | LOCAL_SRC_FILES := \ 109 | $(LIBUSB_ROOT_REL)/examples/dpfp.c 110 | 111 | LOCAL_C_INCLUDES += \ 112 | $(LIBUSB_ROOT_ABS) 113 | 114 | LOCAL_SHARED_LIBRARIES += libusb1.0 115 | 116 | LOCAL_MODULE:= dpfp 117 | 118 | include $(BUILD_EXECUTABLE) 119 | 120 | # dpfp_threaded 121 | 122 | include $(CLEAR_VARS) 123 | 124 | LOCAL_SRC_FILES := \ 125 | $(LIBUSB_ROOT_REL)/examples/dpfp_threaded.c 126 | 127 | LOCAL_C_INCLUDES += \ 128 | $(LIBUSB_ROOT_ABS) 129 | 130 | LOCAL_SHARED_LIBRARIES += libusb1.0 131 | 132 | LOCAL_MODULE:= dpfp_threaded 133 | 134 | include $(BUILD_EXECUTABLE) 135 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/android/jni/libusb.mk: -------------------------------------------------------------------------------- 1 | # Android build config for libusb 2 | # Copyright © 2012-2013 RealVNC Ltd. 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; either 7 | # version 2.1 of the License, or (at your option) any later version. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | LOCAL_PATH:= $(call my-dir) 20 | LIBUSB_ROOT_REL:= ../.. 21 | LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../.. 22 | 23 | # libusb 24 | 25 | include $(CLEAR_VARS) 26 | 27 | LIBUSB_ROOT_REL:= ../.. 28 | LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../.. 29 | 30 | LOCAL_SRC_FILES := \ 31 | $(LIBUSB_ROOT_REL)/libusb/core.c \ 32 | $(LIBUSB_ROOT_REL)/libusb/descriptor.c \ 33 | $(LIBUSB_ROOT_REL)/libusb/hotplug.c \ 34 | $(LIBUSB_ROOT_REL)/libusb/io.c \ 35 | $(LIBUSB_ROOT_REL)/libusb/sync.c \ 36 | $(LIBUSB_ROOT_REL)/libusb/strerror.c \ 37 | $(LIBUSB_ROOT_REL)/libusb/os/linux_usbfs.c \ 38 | $(LIBUSB_ROOT_REL)/libusb/os/poll_posix.c \ 39 | $(LIBUSB_ROOT_REL)/libusb/os/threads_posix.c \ 40 | $(LIBUSB_ROOT_REL)/libusb/os/linux_netlink.c 41 | 42 | LOCAL_C_INCLUDES += \ 43 | $(LOCAL_PATH)/.. \ 44 | $(LIBUSB_ROOT_ABS)/libusb \ 45 | $(LIBUSB_ROOT_ABS)/libusb/os 46 | 47 | LOCAL_EXPORT_C_INCLUDES := \ 48 | $(LIBUSB_ROOT_ABS)/libusb 49 | 50 | LOCAL_LDLIBS := -llog 51 | 52 | LOCAL_MODULE := libusb1.0 53 | 54 | include $(BUILD_SHARED_LIBRARY) 55 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/android/jni/tests.mk: -------------------------------------------------------------------------------- 1 | # Android build config for libusb tests 2 | # Copyright © 2012-2013 RealVNC Ltd. 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; either 7 | # version 2.1 of the License, or (at your option) any later version. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | LOCAL_PATH:= $(call my-dir) 20 | LIBUSB_ROOT_REL:= ../.. 21 | LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../.. 22 | 23 | # testlib 24 | 25 | include $(CLEAR_VARS) 26 | 27 | LOCAL_SRC_FILES := \ 28 | $(LIBUSB_ROOT_REL)/tests/testlib.c 29 | 30 | LOCAL_C_INCLUDES += \ 31 | $(LIBUSB_ROOT_ABS)/tests 32 | 33 | LOCAL_EXPORT_C_INCLUDES := \ 34 | $(LIBUSB_ROOT_ABS)/tests 35 | 36 | LOCAL_MODULE := testlib 37 | 38 | include $(BUILD_STATIC_LIBRARY) 39 | 40 | 41 | # stress 42 | 43 | include $(CLEAR_VARS) 44 | 45 | LOCAL_SRC_FILES := \ 46 | $(LIBUSB_ROOT_REL)/tests/stress.c 47 | 48 | LOCAL_C_INCLUDES += \ 49 | $(LIBUSB_ROOT_ABS) 50 | 51 | LOCAL_SHARED_LIBRARIES += libusb1.0 52 | LOCAL_STATIC_LIBRARIES += testlib 53 | 54 | LOCAL_MODULE:= stress 55 | 56 | include $(BUILD_EXECUTABLE) 57 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/dpfp.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/dpfp_threaded-dpfp_threaded.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/fxload-ezusb.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/fxload-fxload.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/hotplugtest.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/listdevs.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/sam3u_benchmark.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/.deps/xusb.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/libusb 2 | LDADD = ../libusb/libusb-1.0.la 3 | 4 | noinst_PROGRAMS = listdevs xusb fxload hotplugtest 5 | 6 | if HAVE_SIGACTION 7 | noinst_PROGRAMS += dpfp 8 | 9 | if THREADS_POSIX 10 | dpfp_threaded_CFLAGS = $(AM_CFLAGS) 11 | noinst_PROGRAMS += dpfp_threaded 12 | endif 13 | 14 | sam3u_benchmark_SOURCES = sam3u_benchmark.c 15 | noinst_PROGRAMS += sam3u_benchmark 16 | endif 17 | 18 | fxload_SOURCES = ezusb.c ezusb.h fxload.c 19 | fxload_CFLAGS = $(THREAD_CFLAGS) $(AM_CFLAGS) 20 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/hotplugtest.c: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */ 2 | /* 3 | * libusb example program for hotplug API 4 | * Copyright © 2012-2013 Nathan Hjelm 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include 22 | #include 23 | 24 | #include "libusb.h" 25 | 26 | int done = 0; 27 | libusb_device_handle *handle; 28 | 29 | static int LIBUSB_CALL hotplug_callback(libusb_context *ctx, libusb_device *dev, libusb_hotplug_event event, void *user_data) 30 | { 31 | struct libusb_device_descriptor desc; 32 | int rc; 33 | 34 | rc = libusb_get_device_descriptor(dev, &desc); 35 | if(LIBUSB_SUCCESS != rc) { 36 | fprintf(stderr, "Error getting device descriptor\n"); 37 | } 38 | 39 | printf("Device attached: %04x:%04x\n", desc.idVendor, desc.idProduct); 40 | 41 | libusb_open(dev, &handle); 42 | 43 | done++; 44 | 45 | return 0; 46 | } 47 | 48 | static int LIBUSB_CALL hotplug_callback_detach(libusb_context *ctx, libusb_device *dev, libusb_hotplug_event event, void *user_data) 49 | { 50 | printf("Device detached\n"); 51 | 52 | libusb_close(handle); 53 | 54 | done++; 55 | return 0; 56 | } 57 | 58 | int main(int argc, char *argv[]) 59 | { 60 | libusb_hotplug_callback_handle hp[2]; 61 | int product_id, vendor_id, class_id; 62 | int rc; 63 | 64 | vendor_id = (argc > 1) ? strtol(argv[1], NULL, 0) : 0x045a; 65 | product_id = (argc > 2) ? strtol(argv[2], NULL, 0) : 0x5005; 66 | class_id = (argc > 3) ? strtol(argv[3], NULL, 0) : LIBUSB_HOTPLUG_MATCH_ANY; 67 | 68 | libusb_init(NULL); 69 | 70 | if(!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) { 71 | printf("Hotplug capabilites are not supported on this platform\n"); 72 | libusb_exit(NULL); 73 | return EXIT_FAILURE; 74 | } 75 | 76 | rc = libusb_hotplug_register_callback(NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, 0, vendor_id, 77 | product_id, class_id, hotplug_callback, NULL, &hp[0]); 78 | if(LIBUSB_SUCCESS != rc) { 79 | fprintf(stderr, "Error registering callback 0\n"); 80 | libusb_exit(NULL); 81 | return EXIT_FAILURE; 82 | } 83 | 84 | rc = libusb_hotplug_register_callback(NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT, 0, vendor_id, 85 | product_id, class_id, hotplug_callback_detach, NULL, &hp[1]); 86 | if(LIBUSB_SUCCESS != rc) { 87 | fprintf(stderr, "Error registering callback 1\n"); 88 | libusb_exit(NULL); 89 | return EXIT_FAILURE; 90 | } 91 | 92 | while(done < 2) { 93 | libusb_handle_events(NULL); 94 | } 95 | 96 | libusb_exit(NULL); 97 | } 98 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/examples/listdevs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libusbx example program to list devices on the bus 3 | * Copyright © 2007 Daniel Drake 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include 21 | 22 | #include "libusb.h" 23 | 24 | static void print_devs(libusb_device **devs) 25 | { 26 | libusb_device *dev; 27 | int i = 0, j = 0; 28 | uint8_t path[8]; 29 | 30 | while((dev = devs[i++]) != NULL) { 31 | struct libusb_device_descriptor desc; 32 | int r = libusb_get_device_descriptor(dev, &desc); 33 | if(r < 0) { 34 | fprintf(stderr, "failed to get device descriptor"); 35 | return; 36 | } 37 | 38 | printf("%04x:%04x (bus %d, device %d)", 39 | desc.idVendor, desc.idProduct, 40 | libusb_get_bus_number(dev), libusb_get_device_address(dev)); 41 | 42 | r = libusb_get_port_numbers(dev, path, sizeof(path)); 43 | if(r > 0) { 44 | printf(" path: %d", path[0]); 45 | for(j = 1; j < r; j++) 46 | printf(".%d", path[j]); 47 | } 48 | printf("\n"); 49 | } 50 | } 51 | 52 | int main(void) 53 | { 54 | libusb_device **devs; 55 | int r; 56 | ssize_t cnt; 57 | 58 | r = libusb_init(NULL); 59 | if(r < 0) 60 | return r; 61 | 62 | cnt = libusb_get_device_list(NULL, &devs); 63 | if(cnt < 0) 64 | return (int) cnt; 65 | 66 | print_devs(devs); 67 | libusb_free_device_list(devs, 1); 68 | 69 | libusb_exit(NULL); 70 | return 0; 71 | } 72 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb-1.0.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libusbx-1.0 7 | Description: C API for USB device access from Linux, Mac OS X, Windows and OpenBSD/NetBSD userspace 8 | Version: 1.0.17 9 | Libs: -L${libdir} -lusb-1.0 10 | Libs.private: -ludev -pthread 11 | Cflags: -I${includedir}/libusb-1.0 12 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb-1.0.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libusbx-1.0 7 | Description: C API for USB device access from Linux, Mac OS X, Windows and OpenBSD/NetBSD userspace 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lusb-1.0 10 | Libs.private: @LIBS@ 11 | Cflags: -I${includedir}/libusb-1.0 12 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/Makefile.am: -------------------------------------------------------------------------------- 1 | all: libusb-1.0.la libusb-1.0.dll 2 | 3 | AUTOMAKE_OPTIONS = subdir-objects 4 | 5 | lib_LTLIBRARIES = libusb-1.0.la 6 | 7 | POSIX_POLL_SRC = os/poll_posix.c 8 | LINUX_USBFS_SRC = os/linux_usbfs.c 9 | DARWIN_USB_SRC = os/darwin_usb.c 10 | OPENBSD_USB_SRC = os/openbsd_usb.c 11 | NETBSD_USB_SRC = os/netbsd_usb.c 12 | WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc libusb-1.0.def 13 | WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h 14 | 15 | EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \ 16 | $(NETBSD_USB_SRC) $(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \ 17 | $(POSIX_POLL_SRC) \ 18 | os/threads_posix.c os/threads_windows.c \ 19 | os/linux_udev.c os/linux_netlink.c 20 | 21 | if OS_LINUX 22 | 23 | if USE_UDEV 24 | OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \ 25 | os/linux_udev.c 26 | else 27 | OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \ 28 | os/linux_netlink.c 29 | endif 30 | 31 | endif 32 | 33 | if OS_DARWIN 34 | OS_SRC = $(DARWIN_USB_SRC) $(POSIX_POLL_SRC) 35 | AM_CFLAGS_EXT = -no-cpp-precomp 36 | endif 37 | 38 | if OS_OPENBSD 39 | OS_SRC = $(OPENBSD_USB_SRC) $(POSIX_POLL_SRC) 40 | endif 41 | 42 | if OS_NETBSD 43 | OS_SRC = $(NETBSD_USB_SRC) $(POSIX_POLL_SRC) 44 | endif 45 | 46 | if OS_WINDOWS 47 | OS_SRC = $(WINDOWS_USB_SRC) 48 | 49 | .rc.lo: 50 | $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@ 51 | 52 | libusb-1.0.rc: version.h version_nano.h 53 | endif 54 | 55 | libusb-1.0.dll: libusb-1.0.def 56 | if CREATE_IMPORT_LIB 57 | # Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged 58 | $(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $(srcdir)/libusb-1.0.def --dllname $@ --output-lib .libs/$@.a 59 | endif 60 | 61 | if THREADS_POSIX 62 | THREADS_SRC = os/threads_posix.h os/threads_posix.c 63 | else 64 | THREADS_SRC = os/threads_windows.h os/threads_windows.c 65 | endif 66 | 67 | libusb_1_0_la_CFLAGS = $(AM_CFLAGS) 68 | libusb_1_0_la_LDFLAGS = $(LTLDFLAGS) 69 | libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c strerror.c sync.c \ 70 | os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h os/windows_common.h \ 71 | hotplug.h hotplug.c $(THREADS_SRC) $(OS_SRC) \ 72 | os/poll_posix.h os/poll_windows.h 73 | 74 | hdrdir = $(includedir)/libusb-1.0 75 | hdr_HEADERS = libusb.h 76 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/hotplug.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; indent-tabs-mode:t ; c-basic-offset:8 -*- */ 2 | /* 3 | * Hotplug support for libusbx 4 | * Copyright © 2012-2013 Nathan Hjelm 5 | * Copyright © 2012-2013 Peter Stuge 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #if !defined(USBI_HOTPLUG_H) 23 | #define USBI_HOTPLUG_H 24 | 25 | #ifndef LIBUSBI_H 26 | #include "libusbi.h" 27 | #endif 28 | 29 | /** \ingroup hotplug 30 | * The hotplug callback structure. The user populates this structure with 31 | * libusb_hotplug_prepare_callback() and then calls libusb_hotplug_register_callback() 32 | * to receive notification of hotplug events. 33 | */ 34 | struct libusb_hotplug_callback { 35 | /** Context this callback is associated with */ 36 | struct libusb_context *ctx; 37 | 38 | /** Vendor ID to match or LIBUSB_HOTPLUG_MATCH_ANY */ 39 | int vendor_id; 40 | 41 | /** Product ID to match or LIBUSB_HOTPLUG_MATCH_ANY */ 42 | int product_id; 43 | 44 | /** Device class to match or LIBUSB_HOTPLUG_MATCH_ANY */ 45 | int dev_class; 46 | 47 | /** Hotplug callback flags */ 48 | libusb_hotplug_flag flags; 49 | 50 | /** Event(s) that will trigger this callback */ 51 | libusb_hotplug_event events; 52 | 53 | /** Callback function to invoke for matching event/device */ 54 | libusb_hotplug_callback_fn cb; 55 | 56 | /** Handle for this callback (used to match on deregister) */ 57 | libusb_hotplug_callback_handle handle; 58 | 59 | /** User data that will be passed to the callback function */ 60 | void *user_data; 61 | 62 | /** Callback is marked for deletion */ 63 | int needs_free; 64 | 65 | /** List this callback is registered in (ctx->hotplug_cbs) */ 66 | struct list_head list; 67 | }; 68 | 69 | typedef struct libusb_hotplug_callback libusb_hotplug_callback; 70 | 71 | struct libusb_hotplug_message { 72 | libusb_hotplug_event event; 73 | struct libusb_device *device; 74 | }; 75 | 76 | typedef struct libusb_hotplug_message libusb_hotplug_message; 77 | 78 | void usbi_hotplug_deregister_all(struct libusb_context *ctx); 79 | void usbi_hotplug_match(struct libusb_context *ctx, struct libusb_device *dev, 80 | libusb_hotplug_event event); 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/libusb-1.0.rc: -------------------------------------------------------------------------------- 1 | /* 2 | * For Windows: input this file to the Resoure Compiler to produce a binary 3 | * .res file. This is then embedded in the resultant library (like any other 4 | * compilation object). 5 | * The information can then be queried using standard APIs and can also be 6 | * viewed with utilities such as Windows Explorer. 7 | */ 8 | #ifndef _WIN32_WCE 9 | #include "winresrc.h" 10 | #endif 11 | 12 | #include "version.h" 13 | #ifndef LIBUSB_VERSIONSTRING 14 | #define LU_STR(s) #s 15 | #define LU_XSTR(s) LU_STR(s) 16 | #if LIBUSB_NANO > 0 17 | #define LIBUSB_VERSIONSTRING \ 18 | LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \ 19 | LU_XSTR(LIBUSB_MICRO) "." LU_XSTR(LIBUSB_NANO) LIBUSB_RC "\0" 20 | #else 21 | #define LIBUSB_VERSIONSTRING \ 22 | LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \ 23 | LU_XSTR(LIBUSB_MICRO) LIBUSB_RC "\0" 24 | #endif 25 | #endif 26 | 27 | VS_VERSION_INFO VERSIONINFO 28 | FILEVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO 29 | PRODUCTVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO 30 | FILEFLAGSMASK 0x3fL 31 | #ifdef _DEBUG 32 | FILEFLAGS 0x1L 33 | #else 34 | FILEFLAGS 0x0L 35 | #endif 36 | FILEOS 0x40004L 37 | FILETYPE 0x2L 38 | FILESUBTYPE 0x0L 39 | BEGIN 40 | BLOCK "StringFileInfo" 41 | BEGIN 42 | BLOCK "040904b0" 43 | BEGIN 44 | VALUE "CompanyName", "libusbx.org\0" 45 | VALUE "FileDescription", "C library for writing portable USB drivers in userspace\0" 46 | VALUE "FileVersion", LIBUSB_VERSIONSTRING 47 | VALUE "InternalName", "libusb\0" 48 | VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0" 49 | VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0" 50 | VALUE "OriginalFilename", "libusb-1.0.dll\0" 51 | VALUE "PrivateBuild", "\0" 52 | VALUE "ProductName", "libusb-1.0\0" 53 | VALUE "ProductVersion", LIBUSB_VERSIONSTRING 54 | VALUE "SpecialBuild", "\0" 55 | END 56 | END 57 | BLOCK "VarFileInfo" 58 | BEGIN 59 | VALUE "Translation", 0x409, 1200 60 | END 61 | END 62 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/.dirstamp -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/libusb_1_0_la-linux_netlink.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/libusb_1_0_la-netbsd_usb.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/libusb_1_0_la-openbsd_usb.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/libusb_1_0_la-poll_windows.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/libusb_1_0_la-threads_posix.Plo: -------------------------------------------------------------------------------- 1 | os/libusb_1_0_la-threads_posix.lo: os/threads_posix.c \ 2 | /usr/include/unistd.h /usr/include/features.h /usr/include/stdc-predef.h \ 3 | /usr/include/arm-linux-gnueabihf/bits/predefs.h \ 4 | /usr/include/arm-linux-gnueabihf/sys/cdefs.h \ 5 | /usr/include/arm-linux-gnueabihf/bits/wordsize.h \ 6 | /usr/include/arm-linux-gnueabihf/gnu/stubs.h \ 7 | /usr/include/arm-linux-gnueabihf/gnu/stubs-hard.h \ 8 | /usr/include/arm-linux-gnueabihf/bits/posix_opt.h \ 9 | /usr/include/arm-linux-gnueabihf/bits/environments.h \ 10 | /usr/include/arm-linux-gnueabihf/bits/types.h \ 11 | /usr/include/arm-linux-gnueabihf/bits/typesizes.h \ 12 | /usr/lib/gcc/arm-linux-gnueabihf/4.7/include/stddef.h \ 13 | /usr/include/arm-linux-gnueabihf/bits/confname.h /usr/include/getopt.h \ 14 | /usr/include/arm-linux-gnueabihf/bits/unistd.h \ 15 | /usr/include/arm-linux-gnueabihf/sys/syscall.h \ 16 | /usr/include/arm-linux-gnueabihf/asm/unistd.h \ 17 | /usr/include/arm-linux-gnueabihf/bits/syscall.h os/threads_posix.h \ 18 | /usr/include/pthread.h /usr/include/endian.h \ 19 | /usr/include/arm-linux-gnueabihf/bits/endian.h \ 20 | /usr/include/arm-linux-gnueabihf/bits/byteswap.h \ 21 | /usr/include/arm-linux-gnueabihf/bits/byteswap-16.h /usr/include/sched.h \ 22 | /usr/include/time.h /usr/include/arm-linux-gnueabihf/bits/sched.h \ 23 | /usr/include/arm-linux-gnueabihf/bits/time.h \ 24 | /usr/include/arm-linux-gnueabihf/bits/timex.h /usr/include/xlocale.h \ 25 | /usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h \ 26 | /usr/include/arm-linux-gnueabihf/bits/setjmp.h 27 | 28 | /usr/include/unistd.h: 29 | 30 | /usr/include/features.h: 31 | 32 | /usr/include/stdc-predef.h: 33 | 34 | /usr/include/arm-linux-gnueabihf/bits/predefs.h: 35 | 36 | /usr/include/arm-linux-gnueabihf/sys/cdefs.h: 37 | 38 | /usr/include/arm-linux-gnueabihf/bits/wordsize.h: 39 | 40 | /usr/include/arm-linux-gnueabihf/gnu/stubs.h: 41 | 42 | /usr/include/arm-linux-gnueabihf/gnu/stubs-hard.h: 43 | 44 | /usr/include/arm-linux-gnueabihf/bits/posix_opt.h: 45 | 46 | /usr/include/arm-linux-gnueabihf/bits/environments.h: 47 | 48 | /usr/include/arm-linux-gnueabihf/bits/types.h: 49 | 50 | /usr/include/arm-linux-gnueabihf/bits/typesizes.h: 51 | 52 | /usr/lib/gcc/arm-linux-gnueabihf/4.7/include/stddef.h: 53 | 54 | /usr/include/arm-linux-gnueabihf/bits/confname.h: 55 | 56 | /usr/include/getopt.h: 57 | 58 | /usr/include/arm-linux-gnueabihf/bits/unistd.h: 59 | 60 | /usr/include/arm-linux-gnueabihf/sys/syscall.h: 61 | 62 | /usr/include/arm-linux-gnueabihf/asm/unistd.h: 63 | 64 | /usr/include/arm-linux-gnueabihf/bits/syscall.h: 65 | 66 | os/threads_posix.h: 67 | 68 | /usr/include/pthread.h: 69 | 70 | /usr/include/endian.h: 71 | 72 | /usr/include/arm-linux-gnueabihf/bits/endian.h: 73 | 74 | /usr/include/arm-linux-gnueabihf/bits/byteswap.h: 75 | 76 | /usr/include/arm-linux-gnueabihf/bits/byteswap-16.h: 77 | 78 | /usr/include/sched.h: 79 | 80 | /usr/include/time.h: 81 | 82 | /usr/include/arm-linux-gnueabihf/bits/sched.h: 83 | 84 | /usr/include/arm-linux-gnueabihf/bits/time.h: 85 | 86 | /usr/include/arm-linux-gnueabihf/bits/timex.h: 87 | 88 | /usr/include/xlocale.h: 89 | 90 | /usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h: 91 | 92 | /usr/include/arm-linux-gnueabihf/bits/setjmp.h: 93 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/libusb_1_0_la-threads_windows.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.deps/libusb_1_0_la-windows_usb.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/.dirstamp -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/poll_posix.c: -------------------------------------------------------------------------------- 1 | /* 2 | * poll_posix: poll compatibility wrapper for POSIX systems 3 | * Copyright © 2013 RealVNC Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #include "libusbi.h" 27 | 28 | int usbi_pipe(int pipefd[2]) 29 | { 30 | int ret = pipe(pipefd); 31 | if(ret != 0) { 32 | return ret; 33 | } 34 | ret = fcntl(pipefd[1], F_GETFL); 35 | if(ret == -1) { 36 | usbi_dbg("Failed to get pipe fd flags: %d", errno); 37 | goto err_close_pipe; 38 | } 39 | ret = fcntl(pipefd[1], F_SETFL, ret | O_NONBLOCK); 40 | if(ret != 0) { 41 | usbi_dbg("Failed to set non-blocking on new pipe: %d", errno); 42 | goto err_close_pipe; 43 | } 44 | 45 | return 0; 46 | 47 | err_close_pipe: 48 | usbi_close(pipefd[0]); 49 | usbi_close(pipefd[1]); 50 | return ret; 51 | } 52 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/poll_posix.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBUSB_POLL_POSIX_H 2 | #define LIBUSB_POLL_POSIX_H 3 | 4 | #define usbi_write write 5 | #define usbi_read read 6 | #define usbi_close close 7 | #define usbi_poll poll 8 | 9 | int usbi_pipe(int pipefd[2]); 10 | 11 | #endif /* LIBUSB_POLL_POSIX_H */ 12 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/threads_posix.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libusbx synchronization using POSIX Threads 3 | * 4 | * Copyright © 2011 Vitali Lovich 5 | * Copyright © 2011 Peter Stuge 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #if defined(__linux__) || defined(__OpenBSD__) 23 | # if defined(__linux__) 24 | # define _GNU_SOURCE 25 | # else 26 | # define _BSD_SOURCE 27 | # endif 28 | # include 29 | # include 30 | #elif defined(__APPLE__) 31 | # include 32 | #elif defined(__CYGWIN__) 33 | # include 34 | #endif 35 | 36 | #include "threads_posix.h" 37 | 38 | int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) 39 | { 40 | int err; 41 | pthread_mutexattr_t stack_attr; 42 | if(!attr) { 43 | attr = &stack_attr; 44 | err = pthread_mutexattr_init(&stack_attr); 45 | if(err != 0) 46 | return err; 47 | } 48 | 49 | /* mutexattr_settype requires _GNU_SOURCE or _XOPEN_SOURCE >= 500 on Linux */ 50 | err = pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE); 51 | if(err != 0) 52 | goto finish; 53 | 54 | err = pthread_mutex_init(mutex, attr); 55 | 56 | finish: 57 | if(attr == &stack_attr) 58 | pthread_mutexattr_destroy(&stack_attr); 59 | 60 | return err; 61 | } 62 | 63 | int usbi_get_tid(void) 64 | { 65 | int ret = -1; 66 | #if defined(__ANDROID__) 67 | ret = gettid(); 68 | #elif defined(__linux__) 69 | ret = syscall(SYS_gettid); 70 | #elif defined(__OpenBSD__) 71 | /* The following only works with OpenBSD > 5.1 as it requires 72 | real thread support. For 5.1 and earlier, -1 is returned. */ 73 | ret = syscall(SYS_getthrid); 74 | #elif defined(__APPLE__) 75 | ret = mach_thread_self(); 76 | mach_port_deallocate(mach_task_self(), ret); 77 | #elif defined(__CYGWIN__) 78 | ret = GetCurrentThreadId(); 79 | #endif 80 | /* TODO: NetBSD thread ID support */ 81 | return ret; 82 | } 83 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/threads_posix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libusbx synchronization using POSIX Threads 3 | * 4 | * Copyright © 2010 Peter Stuge 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef LIBUSB_THREADS_POSIX_H 22 | #define LIBUSB_THREADS_POSIX_H 23 | 24 | #include 25 | 26 | #define usbi_mutex_static_t pthread_mutex_t 27 | #define USBI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER 28 | #define usbi_mutex_static_lock pthread_mutex_lock 29 | #define usbi_mutex_static_unlock pthread_mutex_unlock 30 | 31 | #define usbi_mutex_t pthread_mutex_t 32 | #define usbi_mutex_init pthread_mutex_init 33 | #define usbi_mutex_lock pthread_mutex_lock 34 | #define usbi_mutex_unlock pthread_mutex_unlock 35 | #define usbi_mutex_trylock pthread_mutex_trylock 36 | #define usbi_mutex_destroy pthread_mutex_destroy 37 | 38 | #define usbi_cond_t pthread_cond_t 39 | #define usbi_cond_init pthread_cond_init 40 | #define usbi_cond_wait pthread_cond_wait 41 | #define usbi_cond_timedwait pthread_cond_timedwait 42 | #define usbi_cond_broadcast pthread_cond_broadcast 43 | #define usbi_cond_destroy pthread_cond_destroy 44 | #define usbi_cond_signal pthread_cond_signal 45 | 46 | extern int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr); 47 | 48 | int usbi_get_tid(void); 49 | 50 | #endif /* LIBUSB_THREADS_POSIX_H */ 51 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/os/threads_windows.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libusbx synchronization on Microsoft Windows 3 | * 4 | * Copyright © 2010 Michael Plante 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef LIBUSB_THREADS_WINDOWS_H 22 | #define LIBUSB_THREADS_WINDOWS_H 23 | 24 | #define usbi_mutex_static_t volatile LONG 25 | #define USBI_MUTEX_INITIALIZER 0 26 | 27 | #define usbi_mutex_t HANDLE 28 | 29 | struct usbi_cond_perthread { 30 | struct list_head list; 31 | DWORD tid; 32 | HANDLE event; 33 | }; 34 | struct usbi_cond_t_ { 35 | // Every time a thread touches the CV, it winds up in one of these lists. 36 | // It stays there until the CV is destroyed, even if the thread 37 | // terminates. 38 | struct list_head waiters; 39 | struct list_head not_waiting; 40 | }; 41 | typedef struct usbi_cond_t_ usbi_cond_t; 42 | 43 | // We *were* getting timespec from pthread.h: 44 | #if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED)) 45 | #define HAVE_STRUCT_TIMESPEC 1 46 | #define _TIMESPEC_DEFINED 1 47 | struct timespec { 48 | long tv_sec; 49 | long tv_nsec; 50 | }; 51 | #endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */ 52 | 53 | // We *were* getting ETIMEDOUT from pthread.h: 54 | #ifndef ETIMEDOUT 55 | # define ETIMEDOUT 10060 /* This is the value in winsock.h. */ 56 | #endif 57 | 58 | #define usbi_mutexattr_t void 59 | #define usbi_condattr_t void 60 | 61 | // all Windows mutexes are recursive 62 | #define usbi_mutex_init_recursive(mutex, attr) usbi_mutex_init((mutex), (attr)) 63 | 64 | int usbi_mutex_static_lock(usbi_mutex_static_t *mutex); 65 | int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex); 66 | 67 | 68 | int usbi_mutex_init(usbi_mutex_t *mutex, 69 | const usbi_mutexattr_t *attr); 70 | int usbi_mutex_lock(usbi_mutex_t *mutex); 71 | int usbi_mutex_unlock(usbi_mutex_t *mutex); 72 | int usbi_mutex_trylock(usbi_mutex_t *mutex); 73 | int usbi_mutex_destroy(usbi_mutex_t *mutex); 74 | 75 | int usbi_cond_init(usbi_cond_t *cond, 76 | const usbi_condattr_t *attr); 77 | int usbi_cond_destroy(usbi_cond_t *cond); 78 | int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex); 79 | int usbi_cond_timedwait(usbi_cond_t *cond, 80 | usbi_mutex_t *mutex, 81 | const struct timespec *abstime); 82 | int usbi_cond_broadcast(usbi_cond_t *cond); 83 | int usbi_cond_signal(usbi_cond_t *cond); 84 | 85 | int usbi_get_tid(void); 86 | 87 | #endif /* LIBUSB_THREADS_WINDOWS_H */ 88 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/version.h: -------------------------------------------------------------------------------- 1 | /* This file is parsed by m4 and windres and RC.EXE so please keep it simple. */ 2 | #include "version_nano.h" 3 | #ifndef LIBUSB_MAJOR 4 | #define LIBUSB_MAJOR 1 5 | #endif 6 | #ifndef LIBUSB_MINOR 7 | #define LIBUSB_MINOR 0 8 | #endif 9 | #ifndef LIBUSB_MICRO 10 | #define LIBUSB_MICRO 17 11 | #endif 12 | #ifndef LIBUSB_NANO 13 | #define LIBUSB_NANO 0 14 | #endif 15 | /* LIBUSB_RC is the release candidate suffix. Should normally be empty. */ 16 | #ifndef LIBUSB_RC 17 | #define LIBUSB_RC "" 18 | #endif 19 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/libusb/version_nano.h: -------------------------------------------------------------------------------- 1 | #define LIBUSB_NANO 10830 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 3337 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.2]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3337]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.2' 20 | macro_revision='1.3337' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Manual config for MSVC. */ 2 | 3 | #ifndef _MSC_VER 4 | #warn "msvc/config.h shouldn't be included for your development environment." 5 | #error "Please make sure the msvc/ directory is removed from your build path." 6 | #endif 7 | 8 | /* Disable: warning C4200: nonstandard extension used : zero-sized array in struct/union */ 9 | #pragma warning(disable:4200) 10 | /* Disable: warning C6258: Using TerminateThread does not allow proper thread clean up */ 11 | #pragma warning(disable: 6258) 12 | #if defined(_PREFAST_) 13 | /* Disable "Banned API" errors when using the MS's WDK OACR/Prefast */ 14 | #pragma warning(disable:28719) 15 | /* Disable "The function 'InitializeCriticalSection' must be called from within a try/except block" */ 16 | #pragma warning(disable:28125) 17 | #endif 18 | 19 | /* Default visibility */ 20 | #define DEFAULT_VISIBILITY /**/ 21 | 22 | /* Enable global message logging */ 23 | #define ENABLE_LOGGING 1 24 | 25 | /* Uncomment to start with debug message logging enabled */ 26 | // #define ENABLE_DEBUG_LOGGING 1 27 | 28 | /* Uncomment to enabling logging to system log */ 29 | // #define USE_SYSTEM_LOGGING_FACILITY 30 | 31 | /* type of second poll() argument */ 32 | #define POLL_NFDS_TYPE unsigned int 33 | 34 | /* Windows/WinCE backend */ 35 | #if defined(_WIN32_WCE) 36 | #define OS_WINCE 1 37 | #define HAVE_MISSING_H 38 | #else 39 | #define OS_WINDOWS 1 40 | #define HAVE_SIGNAL_H 1 41 | #define HAVE_SYS_TYPES_H 1 42 | #endif 43 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/errno.h: -------------------------------------------------------------------------------- 1 | /* 2 | * errno.h 3 | * This file has no copyright assigned and is placed in the Public Domain. 4 | * This file is a part of the mingw-runtime package. 5 | * No warranty is given; refer to the file DISCLAIMER within the package. 6 | * 7 | * Error numbers and access to error reporting. 8 | * 9 | */ 10 | 11 | #ifndef _ERRNO_H_ 12 | #define _ERRNO_H_ 13 | 14 | #include 15 | 16 | /* 17 | * Error numbers. 18 | * TODO: Can't be sure of some of these assignments, I guessed from the 19 | * names given by strerror and the defines in the Cygnus errno.h. A lot 20 | * of the names from the Cygnus errno.h are not represented, and a few 21 | * of the descriptions returned by strerror do not obviously match 22 | * their error naming. 23 | */ 24 | #define EPERM 1 /* Operation not permitted */ 25 | #define ENOFILE 2 /* No such file or directory */ 26 | #define ENOENT 2 27 | #define ESRCH 3 /* No such process */ 28 | #define EINTR 4 /* Interrupted function call */ 29 | #define EIO 5 /* Input/output error */ 30 | #define ENXIO 6 /* No such device or address */ 31 | #define E2BIG 7 /* Arg list too long */ 32 | #define ENOEXEC 8 /* Exec format error */ 33 | #define EBADF 9 /* Bad file descriptor */ 34 | #define ECHILD 10 /* No child processes */ 35 | #define EAGAIN 11 /* Resource temporarily unavailable */ 36 | #define ENOMEM 12 /* Not enough space */ 37 | #define EACCES 13 /* Permission denied */ 38 | #define EFAULT 14 /* Bad address */ 39 | /* 15 - Unknown Error */ 40 | #define EBUSY 16 /* strerror reports "Resource device" */ 41 | #define EEXIST 17 /* File exists */ 42 | #define EXDEV 18 /* Improper link (cross-device link?) */ 43 | #define ENODEV 19 /* No such device */ 44 | #define ENOTDIR 20 /* Not a directory */ 45 | #define EISDIR 21 /* Is a directory */ 46 | #define EINVAL 22 /* Invalid argument */ 47 | #define ENFILE 23 /* Too many open files in system */ 48 | #define EMFILE 24 /* Too many open files */ 49 | #define ENOTTY 25 /* Inappropriate I/O control operation */ 50 | /* 26 - Unknown Error */ 51 | #define EFBIG 27 /* File too large */ 52 | #define ENOSPC 28 /* No space left on device */ 53 | #define ESPIPE 29 /* Invalid seek (seek on a pipe?) */ 54 | #define EROFS 30 /* Read-only file system */ 55 | #define EMLINK 31 /* Too many links */ 56 | #define EPIPE 32 /* Broken pipe */ 57 | #define EDOM 33 /* Domain error (math functions) */ 58 | #define ERANGE 34 /* Result too large (possibly too small) */ 59 | /* 35 - Unknown Error */ 60 | #define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */ 61 | #define EDEADLK 36 62 | #if 0 63 | /* 37 - Unknown Error */ 64 | #define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */ 65 | #define ENOLCK 39 /* No locks available (46 in Cyg?) */ 66 | #define ENOSYS 40 /* Function not implemented (88 in Cyg?) */ 67 | #define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */ 68 | #define EILSEQ 42 /* Illegal byte sequence */ 69 | #endif 70 | 71 | /* 72 | * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the 73 | * sockets.h header provided with windows32api-0.1.2. 74 | * You should go and put an #if 0 ... #endif around the whole block 75 | * of errors (look at the comment above them). 76 | */ 77 | 78 | #ifndef RC_INVOKED 79 | 80 | #ifdef __cplusplus 81 | extern "C" { 82 | #endif 83 | 84 | /* 85 | * Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see 86 | * stdlib.h. 87 | */ 88 | #if defined(_UWIN) || defined(_WIN32_WCE) 89 | #undef errno 90 | extern int errno; 91 | #else 92 | _CRTIMP int* __cdecl _errno(void); 93 | #define errno (*_errno()) 94 | #endif 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif /* Not RC_INVOKED */ 101 | 102 | #endif /* Not _ERRNO_H_ */ -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/fxload_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {651ff73d-037b-4903-8dd3-56e9950be25c} 10 | 11 | 12 | 13 | 14 | Source Files 15 | 16 | 17 | Source Files 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/fxload_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {651ff73d-037b-4903-8dd3-56e9950be25c} 10 | 11 | 12 | 13 | 14 | Source Files 15 | 16 | 17 | Source Files 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/fxload_sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=fxload 2 | TARGETTYPE=PROGRAM 3 | 386_STDCALL=0 4 | 5 | _NT_TARGET_VERSION= $(_NT_TARGET_VERSION_WINXP) 6 | 7 | !IFNDEF MSC_WARNING_LEVEL 8 | MSC_WARNING_LEVEL=/W3 9 | !ENDIF 10 | 11 | !IFDEF STATIC_LIBC 12 | USE_LIBCMT=1 13 | !ELSE 14 | USE_MSVCRT=1 15 | !ENDIF 16 | 17 | UMTYPE=console 18 | INCLUDES=..\..\msvc;..\..\libusb;..\getopt;$(DDK_INC_PATH) 19 | C_DEFINES=$(C_DEFINES) /D__GNU_LIBRARY__ 20 | UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib \ 21 | ..\getopt\getopt_ddkbuild\obj$(BUILD_ALT_DIR)\*\getopt.lib 22 | SOURCES=..\ezusb.c \ 23 | ..\fxload.c 24 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/getopt_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | 22 | 23 | Header Files 24 | 25 | 26 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/getopt_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | 22 | 23 | Header Files 24 | 25 | 26 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/getopt_sources: -------------------------------------------------------------------------------- 1 | TARGETTYPE=LIBRARY 2 | TARGETNAME=getopt 3 | 386_STDCALL=0 4 | 5 | _NT_TARGET_VERSION= $(_NT_TARGET_VERSION_WINXP) 6 | 7 | !IFNDEF MSC_WARNING_LEVEL 8 | MSC_WARNING_LEVEL=/W3 9 | !ENDIF 10 | 11 | USE_MSVCRT=1 12 | 13 | INCLUDES=$(DDK_INC_PATH) 14 | C_DEFINES = $(C_DEFINES) /DDDKBUILD /DHAVE_STRING_H 15 | 16 | TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib \ 17 | $(SDK_LIB_PATH)\user32.lib 18 | 19 | SOURCES=..\getopt1.c \ 20 | ..\getopt.c 21 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/hotplugtest_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/hotplugtest_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/hotplugtest_sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=hotplugtest 2 | TARGETTYPE=PROGRAM 3 | 386_STDCALL=0 4 | 5 | _NT_TARGET_VERSION= $(_NT_TARGET_VERSION_WINXP) 6 | 7 | !IFNDEF MSC_WARNING_LEVEL 8 | MSC_WARNING_LEVEL=/W3 9 | !ENDIF 10 | 11 | !IFDEF STATIC_LIBC 12 | USE_LIBCMT=1 13 | !ELSE 14 | USE_MSVCRT=1 15 | !ENDIF 16 | 17 | UMTYPE=console 18 | INCLUDES=..\..\msvc;..\..\libusb;$(DDK_INC_PATH) 19 | UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib 20 | SOURCES=..\hotplugtest.c 21 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/libusb_dll_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {d81e81ca-b13e-4a15-b54b-b12b41361e6b} 14 | 15 | 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | Header Files 60 | 61 | 62 | Header Files 63 | 64 | 65 | Header Files 66 | 67 | 68 | Header Files 69 | 70 | 71 | 72 | 73 | Resource Files 74 | 75 | 76 | 77 | 78 | Resource Files 79 | 80 | 81 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/libusb_dll_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {d81e81ca-b13e-4a15-b54b-b12b41361e6b} 14 | 15 | 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | Header Files 60 | 61 | 62 | Header Files 63 | 64 | 65 | Header Files 66 | 67 | 68 | Header Files 69 | 70 | 71 | Header Files 72 | 73 | 74 | 75 | 76 | Resource Files 77 | 78 | 79 | 80 | 81 | Resource Files 82 | 83 | 84 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/libusb_sources: -------------------------------------------------------------------------------- 1 | #TARGETTYPE is not defined, to allow selection between static lib or DLL with ddk_build 2 | TARGETNAME=libusb-1.0 3 | DLLDEF=..\libusb-1.0.def 4 | 5 | !IFNDEF MSC_WARNING_LEVEL 6 | MSC_WARNING_LEVEL=/W3 7 | !ENDIF 8 | 9 | !IFDEF STATIC_LIBC 10 | USE_LIBCMT=1 11 | !ELSE 12 | USE_MSVCRT=1 13 | !ENDIF 14 | 15 | INCLUDES=..;..\..\msvc;$(DDK_INC_PATH) 16 | C_DEFINES= $(C_DEFINES) $(LIBUSB_DEFINES) /DDDKBUILD 17 | 18 | # http://jpassing.com/2009/10/21/ltcg-issues-with-the-win7amd64-environment-of-wdk-7600/ 19 | # prevents the following error when using the 64 bit static lib with Visual Studio 2010: 20 | # "fatal error C1001: An internal error has occurred in the compiler. 21 | # (compiler file 'f:\dd\vctools\compiler\utc\src\p2\p2symtab.c', line 1823)" 22 | # and the following with Visual Studio 2010: 23 | # "fatal error C1047: The object or library file 'libusb-1.0.lib' was created with 24 | # an older compiler than other objects; rebuild old objects and libraries" 25 | USER_C_FLAGS=/GL- 26 | 27 | TARGETLIBS=$(SDK_LIB_PATH)\kernel32.lib 28 | 29 | SOURCES=..\core.c \ 30 | ..\descriptor.c \ 31 | ..\io.c \ 32 | ..\strerror.c \ 33 | ..\sync.c \ 34 | ..\hotplug.c \ 35 | threads_windows.c \ 36 | poll_windows.c \ 37 | windows_usb.c \ 38 | ..\libusb-1.0.rc 39 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/libusb_static_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | 43 | 44 | Header Files 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | Header Files 60 | 61 | 62 | Header Files 63 | 64 | 65 | Header Files 66 | 67 | 68 | Header Files 69 | 70 | 71 | Header Files 72 | 73 | 74 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/libusb_static_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | 43 | 44 | Header Files 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | Header Files 54 | 55 | 56 | Header Files 57 | 58 | 59 | Header Files 60 | 61 | 62 | Header Files 63 | 64 | 65 | Header Files 66 | 67 | 68 | Header Files 69 | 70 | 71 | Header Files 72 | 73 | 74 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/libusbx.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "libusb_dll"=".\libusb_dll.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "libusb_static"=".\libusb_static.dsp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "listdevs"=".\listdevs.dsp" - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | Begin Project Dependency 39 | Project_Dep_Name libusb_static 40 | End Project Dependency 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | Project: "xusb"=".\xusb.dsp" - Package Owner=<4> 46 | 47 | Package=<5> 48 | {{{ 49 | }}} 50 | 51 | Package=<4> 52 | {{{ 53 | Begin Project Dependency 54 | Project_Dep_Name libusb_static 55 | End Project Dependency 56 | }}} 57 | 58 | ############################################################################### 59 | 60 | Global: 61 | 62 | Package=<5> 63 | {{{ 64 | }}} 65 | 66 | Package=<3> 67 | {{{ 68 | }}} 69 | 70 | ############################################################################### 71 | 72 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/listdevs_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/listdevs_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/listdevs_sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=listdevs 2 | TARGETTYPE=PROGRAM 3 | 386_STDCALL=0 4 | 5 | _NT_TARGET_VERSION= $(_NT_TARGET_VERSION_WINXP) 6 | !IFNDEF MSC_WARNING_LEVEL 7 | MSC_WARNING_LEVEL=/W3 8 | !ENDIF 9 | 10 | !IFDEF STATIC_LIBC 11 | USE_LIBCMT=1 12 | !ELSE 13 | USE_MSVCRT=1 14 | !ENDIF 15 | 16 | UMTYPE=console 17 | INCLUDES=..\..\libusb;$(DDK_INC_PATH) 18 | UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib 19 | SOURCES=..\listdevs.c 20 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/missing.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Source file for missing WinCE functionality 3 | * Copyright © 2012 RealVNC Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #include "missing.h" 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | // The registry path to store environment variables 28 | #define ENVIRONMENT_REG_PATH _T("Software\\libusb\\environment") 29 | 30 | /* Workaround getenv not being available on WinCE. 31 | * Instead look in HKLM\Software\libusb\environment */ 32 | char *getenv(const char *name) 33 | { 34 | static char value[MAX_PATH]; 35 | TCHAR wValue[MAX_PATH]; 36 | WCHAR wName[MAX_PATH]; 37 | DWORD dwType, dwData; 38 | HKEY hkey; 39 | LONG rc; 40 | 41 | if(!name) 42 | return NULL; 43 | 44 | if(MultiByteToWideChar(CP_UTF8, 0, name, -1, wName, MAX_PATH) <= 0) { 45 | usbi_dbg("Failed to convert environment variable name to wide string"); 46 | return NULL; 47 | } 48 | wName[MAX_PATH - 1] = 0; // Be sure it's NUL terminated 49 | 50 | rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, ENVIRONMENT_REG_PATH, 0, KEY_QUERY_VALUE, &hkey); 51 | if(rc != ERROR_SUCCESS) { 52 | usbi_dbg("Failed to open registry key for getenv with error %d", rc); 53 | return NULL; 54 | } 55 | 56 | // Attempt to read the key 57 | dwData = sizeof(wValue); 58 | rc = RegQueryValueEx(hkey, wName, NULL, &dwType, 59 | (LPBYTE)&wValue, &dwData); 60 | RegCloseKey(hkey); 61 | if(rc != ERROR_SUCCESS) { 62 | usbi_dbg("Failed to read registry key value for getenv with error %d", rc); 63 | return NULL; 64 | } 65 | if(dwType != REG_SZ) { 66 | usbi_dbg("Registry value was of type %d instead of REG_SZ", dwType); 67 | return NULL; 68 | } 69 | 70 | // Success in reading the key, convert from WCHAR to char 71 | if(WideCharToMultiByte(CP_UTF8, 0, 72 | wValue, dwData / sizeof(*wValue), 73 | value, MAX_PATH, 74 | NULL, NULL) <= 0) { 75 | usbi_dbg("Failed to convert environment variable value to narrow string"); 76 | return NULL; 77 | } 78 | value[MAX_PATH - 1] = 0; // Be sure it's NUL terminated 79 | return value; 80 | } 81 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/missing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Header file for missing WinCE functionality 3 | * Copyright © 2012-2013 RealVNC Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef MISSING_H 21 | #define MISSING_H 22 | 23 | /* Windows CE doesn't have SleepEx() - Fallback to Sleep() */ 24 | #define SleepEx(m, a) Sleep(m) 25 | 26 | /* Windows CE doesn't have any APIs to query environment variables. 27 | * 28 | * This contains a registry based implementation of getenv. 29 | */ 30 | char *getenv(const char *name); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/stress_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {28b6220e-d087-4f48-bd69-ffe0ac5bcc7a} 10 | 11 | 12 | 13 | 14 | Source Files 15 | 16 | 17 | Source Files 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/stress_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {28b6220e-d087-4f48-bd69-ffe0ac5bcc7a} 10 | 11 | 12 | 13 | 14 | Source Files 15 | 16 | 17 | Source Files 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/xusb_2010.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/xusb_2012.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/msvc/xusb_sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=xusb 2 | TARGETTYPE=PROGRAM 3 | 386_STDCALL=0 4 | 5 | _NT_TARGET_VERSION= $(_NT_TARGET_VERSION_WINXP) 6 | 7 | !IFNDEF MSC_WARNING_LEVEL 8 | MSC_WARNING_LEVEL=/W3 9 | !ENDIF 10 | 11 | !IFDEF STATIC_LIBC 12 | USE_LIBCMT=1 13 | !ELSE 14 | USE_MSVCRT=1 15 | !ENDIF 16 | 17 | UMTYPE=console 18 | INCLUDES=..\..\msvc;..\..\libusb;$(DDK_INC_PATH) 19 | UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib 20 | SOURCES=..\xusb.c 21 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for config.h 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/tests/.deps/stress.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/tests/.deps/testlib.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/libusb 2 | LDADD = ../libusb/libusb-1.0.la 3 | 4 | noinst_PROGRAMS = stress 5 | 6 | stress_SOURCES = stress.c libusbx_testlib.h testlib.c 7 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/deps/libusbx-1.0.17/tests/libusbx_testlib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libusbx test library helper functions 3 | * Copyright © 2012 Toby Gray 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef LIBUSBX_TESTLIB_H 21 | #define LIBUSBX_TESTLIB_H 22 | 23 | #include 24 | 25 | #if !defined(bool) 26 | #define bool int 27 | #endif 28 | #if !defined(true) 29 | #define true (1 == 1) 30 | #endif 31 | #if !defined(false) 32 | #define false (!true) 33 | #endif 34 | 35 | /** Values returned from a test function to indicate test result */ 36 | typedef enum { 37 | /** Indicates that the test ran successfully. */ 38 | TEST_STATUS_SUCCESS, 39 | /** Indicates that the test failed one or more test. */ 40 | TEST_STATUS_FAILURE, 41 | /** Indicates that an unexpected error occurred. */ 42 | TEST_STATUS_ERROR, 43 | /** Indicates that the test can't be run. For example this may be 44 | * due to no suitable device being connected to perform the tests.*/ 45 | TEST_STATUS_SKIP 46 | } libusbx_testlib_result; 47 | 48 | /** 49 | * Context for test library functions 50 | */ 51 | typedef struct { 52 | char ** test_names; 53 | int test_count; 54 | bool list_tests; 55 | bool verbose; 56 | int old_stdout; 57 | int old_stderr; 58 | FILE* output_file; 59 | int null_fd; 60 | } libusbx_testlib_ctx; 61 | 62 | /** 63 | * Logs some test information or state 64 | */ 65 | void libusbx_testlib_logf(libusbx_testlib_ctx * ctx, 66 | const char* fmt, ...); 67 | 68 | /** 69 | * Function pointer for a libusbx test function. 70 | * 71 | * Should return TEST_STATUS_SUCCESS on success or another TEST_STATUS value. 72 | */ 73 | typedef libusbx_testlib_result 74 | (*libusbx_testlib_test_function)(libusbx_testlib_ctx * ctx); 75 | 76 | /** 77 | * Structure holding a test description. 78 | */ 79 | typedef struct { 80 | /** Human readable name of the test. */ 81 | const char * name; 82 | /** The test library will call this function to run the test. */ 83 | libusbx_testlib_test_function function; 84 | } libusbx_testlib_test; 85 | 86 | /** 87 | * Value to use at the end of a test array to indicate the last 88 | * element. 89 | */ 90 | #define LIBUSBX_NULL_TEST {NULL, NULL} 91 | 92 | /** 93 | * Runs the tests provided. 94 | * 95 | * Before running any tests argc and argv will be processed 96 | * to determine the mode of operation. 97 | * 98 | * \param argc The argc from main 99 | * \param argv The argv from main 100 | * \param tests A NULL_TEST terminated array of tests 101 | * \return 0 on success, non-zero on failure 102 | */ 103 | int libusbx_testlib_run_tests(int argc, 104 | char ** argv, 105 | const libusbx_testlib_test * tests); 106 | 107 | #endif //LIBUSBX_TESTLIB_H 108 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Unified Building System for Linux 3 | # By CSK (csk@live.com) 4 | # 5 | 6 | PRJ_ROOT:=.. 7 | MOD_NAME:=infra 8 | 9 | include $(PRJ_ROOT)/scripts/def.mak 10 | 11 | 12 | CSRC:= $(shell find src -name "*.c") 13 | CXXCCSRC:= $(shell find src -name "*.cc") 14 | 15 | 16 | 17 | EXTRA_FLAGS:=-Wno-deprecated 18 | CDEFS+= 19 | DEP_AR+= 20 | 21 | INCLUDES+= -Iinclude 22 | 23 | all: $(STATIC_DEST) 24 | additional_clean: 25 | rm -f $(STATIC_DEST) 26 | 27 | 28 | install: 29 | tar cf - include | (cd $(PREFIX); tar xf -) 30 | 31 | include $(PRJ_ROOT)/scripts/common.mak 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/include/rp/infra_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // infra_config.h 3 | // Infra configure header 4 | // 5 | // Created by Tony Huang on 12/7/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | // Infra version 12 | #define RP_INFRA_VERSION_MAJOR 1 13 | #define RP_INFRA_VERSION_MINOR 0 14 | #define RP_INFRA_VERSION_RELEASE 0 15 | #define RP_INFRA_VERSION_STRING (#RP_INFRA_VERSION_MAJOR "." #RP_INFRA_VERSION_MINOR "." #RP_INFRA_VERSION_RELEASE) 16 | 17 | // Platform detection 18 | #if defined(_WIN64) || defined(_WIN32) 19 | # define RP_INFRA_PLATFORM_WINDOWS 20 | #elif defined(__APPLE__) 21 | # include 22 | # if defined(TARGET_IPHONE_SIMULATOR) 23 | # define RP_INFRA_PLATFORM_IOS 24 | # define RP_INTRA_PLATFORM_IOS_SIMULATOR 25 | # elif defined(TARGET_OS_IPHONE) 26 | # define RP_INTRA_PLATFORM_IOS 27 | # elif defined(TARGET_OS_MAC) 28 | # define RP_INFRA_PLATFORM_MACOS 29 | # endif 30 | #elif defined(__linux) 31 | # define RP_INFRA_PLATFORM_LINUX 32 | #elif defined(__unix) 33 | # define RP_INFRA_PLATFORM_UNIX 34 | #elif defined(__posix) 35 | # define RP_INFRA_PLATFORM_POSIX 36 | #endif 37 | 38 | #if defined(RP_INFRA_PLATFORM_WINDOWS) 39 | # define RP_INFRA_PLATFORM_STRING "windows" 40 | #elif defined(RP_INFRA_PLATFORM_IOS_SIMULATOR) 41 | # define RP_INFRA_PLATFORM_STRING "ios_simulator" 42 | #elif defined(RP_INFRA_PLATFORM_IOS) 43 | # define RP_INFRA_PLATFORM_STRING "ios" 44 | #elif defined(RP_INFRA_PLATFORM_MACOS) 45 | # define RP_INFRA_PLATFORM_STRING "macos" 46 | #elif defined(RP_INFRA_PLATFORM_LINUX) 47 | # define RP_INFRA_PLATFORM_STRING "linux" 48 | #elif defined(RP_INFRA_PLATFORM_UNIX) 49 | # define RP_INFRA_PLATFORM_STRING "unix" 50 | #elif defined(RP_INFRA_PLATFORM_POSIX) 51 | # define RP_INFRA_PLATFORM_STRING "posix" 52 | #else 53 | # error "Unsupported Platform Detected" 54 | #endif 55 | 56 | // Configuration for endian 57 | #if defined(__ORDER_LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN__) || defined(RP_INFRA_PLATFORM_WINDOWS) 58 | # define RP_INFRA_LITTLE_ENDIAN 59 | # define RP_INFRA_ENDIAN_STRING "little_endian" 60 | #else 61 | # define RP_INFRA_BIG_ENDIAN 62 | # define RP_INFRA_ENDIAN_STRING "big_endian" 63 | #endif 64 | 65 | #if defined(RP_INFRA_PLATFORM_WINDOWS) 66 | # define RP_INFRA_API __declspec(dllexport) 67 | # define RP_INFRA_CALLBACK __stdcall 68 | # define __attribute__(x) 69 | #else 70 | # define RP_INFRA_API 71 | # define RP_INFRA_CALLBACK 72 | #endif 73 | 74 | #if defined(RP_INFRA_PLATFORM_WINDOWS) 75 | # define WIN32_DEAN_AND_LEAN 76 | # define snprintf sprintf_s 77 | # include 78 | 79 | static inline void sleep(int seconds) 80 | { 81 | Sleep(seconds * 1000); 82 | } 83 | #endif 84 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/include/rp/util/buffer.h: -------------------------------------------------------------------------------- 1 | // 2 | // buffer.h 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/16/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | 14 | namespace rp 15 | { 16 | namespace util 17 | { 18 | 19 | class BufferImpl; 20 | 21 | /** 22 | * \brief Memory buffer 23 | * 24 | * Buffer is very similar to the native C array. 25 | * The size of Buffer is fixed when the Buffer is created, and you can use copy contructor or assign operator to create a clone of a Buffer 26 | * The only way to access the internal data of Buffer is to use the lock() method to lock the data and avoid other thread's access to the data. 27 | * After usage, you need to invoke the unlock method to release the buffer. 28 | */ 29 | class RP_INFRA_API Buffer 30 | { 31 | public: 32 | /** 33 | * \brief Create a buffer 34 | * 35 | * Create a buffer of particular size. The memory area is just allocated and uninitialized, so please don't assume it's zero filled or 0xff filled. 36 | * 37 | * \param size The size of the buffer 38 | */ 39 | Buffer(size_t size); 40 | 41 | /** 42 | * \brief Create a buffer by cloning another buffer 43 | * 44 | * Create a buffer with the same size, and copy all data from another buffer to make a clone. 45 | * 46 | * \param that The other buffer 47 | */ 48 | Buffer(const Buffer& that); 49 | 50 | /** 51 | * Release the buffer 52 | */ 53 | ~Buffer(); 54 | 55 | /** 56 | * Clone another buffer's data and replace current buffer 57 | * 58 | * \param that The other buffer 59 | */ 60 | Buffer& operator=(const Buffer& that); 61 | 62 | /** 63 | * Lock the buffer and get the pointer to the inner buffer 64 | */ 65 | void* lock(); 66 | 67 | /** 68 | * \brief Unlock the locked buffer 69 | * 70 | * Unlock the locked buffer. Please note that the buffer param should exactly match the return value of lock() method when you lock the buffer. 71 | */ 72 | void unlock(void* buffer); 73 | 74 | /** 75 | * The size of the buffer (in bytes) 76 | */ 77 | size_t size() const; 78 | 79 | private: 80 | std::unique_ptr impl_; 81 | }; 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/include/rp/util/endian.h: -------------------------------------------------------------------------------- 1 | // 2 | // endian.h 3 | // Deal with endian issues 4 | // 5 | // Created by Tony Huang on 12/11/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | 14 | namespace rp 15 | { 16 | namespace util 17 | { 18 | 19 | /** 20 | * Convert unsigned 16bit integer from little endian to cpu endian 21 | */ 22 | static inline uint16_t le16_to_cpu(uint16_t v) 23 | { 24 | #ifdef RP_INFRA_BIG_ENDIAN 25 | return (v >> 8) | ((v & 0xffu) << 8); 26 | #else 27 | return v; 28 | #endif 29 | } 30 | 31 | /** 32 | * Convert unsigned 16bit integer from cpu endian to little endian 33 | */ 34 | static inline uint16_t cpu_to_le16(uint16_t v) 35 | { 36 | return le16_to_cpu(v); 37 | } 38 | 39 | /** 40 | * Convert unsigned 32bit integer from little endian to cpu endian 41 | */ 42 | static inline uint32_t le32_to_cpu(uint32_t v) 43 | { 44 | #ifdef RP_INFRA_BIG_ENDIAN 45 | return (v >> 24) | (((v >> 16) & 0xffu) << 8) | (((v >> 8) & 0xffu) << 16) | ((v & 0xffu) << 24); 46 | #else 47 | return v; 48 | #endif 49 | } 50 | 51 | /** 52 | * Convert unsigned 32bit integer from cpu endian to little endian 53 | */ 54 | static inline uint32_t cpu_to_le32(uint32_t v) 55 | { 56 | return le32_to_cpu(v); 57 | } 58 | 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/include/rp/util/exception.h: -------------------------------------------------------------------------------- 1 | // 2 | // exception.h 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/17/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace rp 16 | { 17 | namespace util 18 | { 19 | 20 | /** 21 | * \brief The Exception class 22 | * 23 | * The C++ interface of RoboPeak Mini USB Display use exceptions to pass errors (instead of the legacy, hard-to-use return code method). Exception class instance is the only exception type the SDK will throw. 24 | * 25 | * Example 26 | * \code{.cpp} 27 | * try { 28 | * // some calls to the sdk 29 | * } catch (Exception& e) { 30 | * // deal with the error 31 | * } 32 | * \endcode 33 | */ 34 | class RP_INFRA_API Exception 35 | { 36 | public: 37 | /** 38 | * Construct an exception 39 | * 40 | * \param errorCode The error code 41 | * \param name The name of the error 42 | * \param description Detailed information of the error 43 | */ 44 | Exception(int errorCode, const std::string& name = "", const std::string& description = ""); 45 | 46 | /** 47 | * Construct an exception by cloning another one 48 | */ 49 | Exception(const Exception& that); 50 | 51 | ~Exception(); 52 | 53 | Exception& operator=(const Exception& that); 54 | 55 | /** 56 | * Get the error code 57 | */ 58 | int errorCode() const; 59 | 60 | /** 61 | * Get the name of the error 62 | */ 63 | const std::string& name() const; 64 | 65 | /** 66 | * Get detailed information of the error 67 | */ 68 | const std::string& description() const; 69 | 70 | /** 71 | * Format to friendly string 72 | */ 73 | std::string toString() const; 74 | 75 | /** 76 | * Print error to the console (std::cerr) 77 | */ 78 | void printToConsole() const; 79 | 80 | private: 81 | int errorCode_; 82 | std::string name_; 83 | std::string description_; 84 | }; 85 | 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/include/rp/util/int_types.h: -------------------------------------------------------------------------------- 1 | // 2 | // int_types.h 3 | // Integer types 4 | // 5 | // Created by Tony Huang on 12/11/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | //Basic types 12 | // 13 | #ifdef WIN32 14 | 15 | //fake stdint.h for VC only 16 | 17 | typedef signed char int8_t; 18 | typedef unsigned char uint8_t; 19 | 20 | typedef __int16 int16_t; 21 | typedef unsigned __int16 uint16_t; 22 | 23 | typedef __int32 int32_t; 24 | typedef unsigned __int32 uint32_t; 25 | 26 | typedef __int64 int64_t; 27 | typedef unsigned __int64 uint64_t; 28 | 29 | #else 30 | # include 31 | #endif 32 | 33 | typedef int8_t _s8; 34 | typedef uint8_t _u8; 35 | typedef int16_t _s16; 36 | typedef uint16_t _u16; 37 | typedef int32_t _s32; 38 | typedef uint32_t _u32; 39 | typedef int64_t _s64; 40 | typedef uint64_t _u64; 41 | 42 | // The _word_size_t uses actual data bus width of the current CPU 43 | #ifdef _AVR_ 44 | typedef uint8_t word_size_t; 45 | #elif defined (WIN64) 46 | typedef uint64_t word_size_t; 47 | #elif defined (WIN32) 48 | typedef uint32_t word_size_t; 49 | #elif defined (__GNUC__) 50 | typedef unsigned long word_size_t; 51 | #elif defined (__ICCARM__) 52 | typedef uint32_t word_size_t; 53 | #endif 54 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/include/rp/util/noncopyable.h: -------------------------------------------------------------------------------- 1 | // 2 | // noncopyable.h 3 | // noncopyable 4 | // 5 | // Created by Tony Huang on 12/9/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace rp 14 | { 15 | namespace util 16 | { 17 | 18 | /** 19 | * \brief A base class to avoid noncopyable classes to be copied 20 | * 21 | * A lot of classes we wrote shouldn't be copied (such as File which wraps a native file descriptor). 22 | * by inherting from this class, the default copy constructor and the operator= are deleted to avoid such situation 23 | */ 24 | class RP_INFRA_API noncopyable 25 | { 26 | public: 27 | noncopyable() {} 28 | ~noncopyable() {} 29 | 30 | noncopyable(const noncopyable&) = delete; 31 | noncopyable& operator=(const noncopyable&) = delete; 32 | }; 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/include/rp/util/scopes.h: -------------------------------------------------------------------------------- 1 | // 2 | // scopes.h 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/16/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace rp 16 | { 17 | namespace util 18 | { 19 | 20 | class Buffer; 21 | class BufferLockScopeImpl; 22 | 23 | /** 24 | * \brief The RAII way to lock Buffers 25 | * 26 | * BufferLockScope is a RAII way to access the inner buffer of Buffers. It will automatically lock and unlock buffer by the automatic lifetime management of BufferLockScope in C++. 27 | * 28 | * Example 29 | * \code{.cpp} 30 | * void fillZero(shared_ptr buffer) { 31 | * BufferLockScope scope(buffer); 32 | * memset(scope.getBuffer(), 0, buffer->size()); 33 | * } 34 | * \endcode 35 | */ 36 | class RP_INFRA_API BufferLockScope : public rp::util::noncopyable 37 | { 38 | public: 39 | /** 40 | * Construct a lock scope 41 | * 42 | * \param buffer The Buffer to be locked 43 | */ 44 | BufferLockScope(std::shared_ptr buffer); 45 | 46 | /** 47 | * Automatically unlock Buffer; 48 | */ 49 | ~BufferLockScope(); 50 | 51 | /** 52 | * Get the pointer to the inner buffer of the locked Buffer 53 | */ 54 | void* getBuffer(); 55 | 56 | private: 57 | std::unique_ptr impl_; 58 | }; 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/src/util/buffer.cc: -------------------------------------------------------------------------------- 1 | // 2 | // buffer.cc 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/16/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace std; 16 | 17 | namespace rp { namespace util { 18 | 19 | class BufferImpl { 20 | public: 21 | BufferImpl(size_t size) : size_(size) { 22 | nakedBuffer_ = malloc(size); 23 | 24 | if (!nakedBuffer_) { 25 | throw Exception(-1, "Failed to alloc buffer"); 26 | } 27 | } 28 | 29 | BufferImpl(const BufferImpl& that) : size_(that.size_) { 30 | nakedBuffer_ = malloc(size_); 31 | 32 | if (!nakedBuffer_) { 33 | throw Exception(-1, "Failed to alloc buffer"); 34 | } 35 | 36 | memcpy(nakedBuffer_, that.nakedBuffer_, size_); 37 | } 38 | 39 | ~BufferImpl() { 40 | lock_guard guard(lock_); 41 | 42 | if (nakedBuffer_) { 43 | free(nakedBuffer_); 44 | nakedBuffer_ = 0; 45 | } 46 | } 47 | 48 | void* lock() { 49 | lock_.lock(); 50 | return nakedBuffer_; 51 | } 52 | 53 | void unlock(void* nakedBuffer) { 54 | if (nakedBuffer_ != nakedBuffer) { 55 | throw Exception(-1, "Unlocking wrong naked buffer"); 56 | } 57 | lock_.unlock(); 58 | } 59 | 60 | size_t size() const { 61 | return size_; 62 | } 63 | 64 | private: 65 | mutex lock_; 66 | void* nakedBuffer_; 67 | size_t size_; 68 | }; 69 | 70 | Buffer::Buffer(size_t size) : impl_(new BufferImpl(size)) {} 71 | Buffer::Buffer(const Buffer& that) : impl_(new BufferImpl(*that.impl_)) {} 72 | Buffer::~Buffer() {} 73 | 74 | Buffer& Buffer::operator=(const Buffer &that) { 75 | impl_ = unique_ptr(new BufferImpl(*that.impl_)); 76 | return *this; 77 | } 78 | 79 | void* Buffer::lock() { 80 | return impl_->lock(); 81 | } 82 | 83 | void Buffer::unlock(void* nakedBuffer) { 84 | impl_->unlock(nakedBuffer); 85 | } 86 | 87 | size_t Buffer::size() const { 88 | return impl_->size(); 89 | } 90 | 91 | }} 92 | 93 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/src/util/exception.cc: -------------------------------------------------------------------------------- 1 | // 2 | // exception.cc 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/17/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | 14 | namespace rp { namespace util { 15 | 16 | Exception::Exception(int errorCode, const string& name, const string& description) 17 | : errorCode_(errorCode), name_(name), description_(description) 18 | {} 19 | 20 | Exception::Exception(const Exception& that) : errorCode_(that.errorCode_), name_(that.name_), description_(that.description_) {} 21 | 22 | Exception::~Exception() {} 23 | 24 | Exception& Exception::operator=(const rp::util::Exception &that) { 25 | errorCode_ = that.errorCode_; 26 | name_ = that.name_; 27 | description_ = that.description_; 28 | 29 | return *this; 30 | } 31 | 32 | int Exception::errorCode() const { 33 | return errorCode_; 34 | } 35 | 36 | const string& Exception::name() const { 37 | return name_; 38 | } 39 | 40 | const string& Exception::description() const { 41 | return description_; 42 | } 43 | 44 | string Exception::toString() const { 45 | string name = name_; 46 | if (name.empty()) { 47 | char errorMessage[64]; 48 | snprintf(errorMessage, 64, "Error code: 0x%08x", errorCode_); 49 | name = errorMessage; 50 | } 51 | 52 | return description_.empty() ? name : (name + "\n" + description_); 53 | } 54 | 55 | void Exception::printToConsole() const { 56 | string errorMessage = toString(); 57 | 58 | fprintf(stderr, "%s\n", errorMessage.c_str()); 59 | } 60 | 61 | }} 62 | 63 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/infra/src/util/scopes.cc: -------------------------------------------------------------------------------- 1 | // 2 | // scopes.cc 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/16/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | 14 | namespace rp { namespace util { 15 | 16 | class BufferLockScopeImpl : public noncopyable { 17 | public: 18 | BufferLockScopeImpl(shared_ptr buffer) : buffer_(buffer) { 19 | nakedBuffer_ = buffer->lock(); 20 | } 21 | 22 | ~BufferLockScopeImpl() { 23 | buffer_->unlock(nakedBuffer_); 24 | } 25 | 26 | void* getBuffer() { 27 | return nakedBuffer_; 28 | } 29 | 30 | private: 31 | shared_ptr buffer_; 32 | void* nakedBuffer_; 33 | }; 34 | 35 | BufferLockScope::BufferLockScope(shared_ptr buffer) : impl_(new BufferLockScopeImpl(buffer)) {} 36 | BufferLockScope::~BufferLockScope() {} 37 | 38 | void* BufferLockScope::getBuffer() { 39 | return impl_->getBuffer(); 40 | } 41 | 42 | }} 43 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/rpusbdisp-drv/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Unified Building System for Linux 3 | # By CSK (csk@live.com) 4 | # 5 | 6 | PRJ_ROOT:=.. 7 | MOD_NAME:=rpusbdisp-drv 8 | 9 | include $(PRJ_ROOT)/scripts/def.mak 10 | 11 | 12 | CSRC:= $(shell find src -name "*.c") 13 | CXXCCSRC:= $(shell find src -name "*.cc") 14 | 15 | 16 | 17 | EXTRA_FLAGS:=-Wno-deprecated 18 | CDEFS+= 19 | DEP_AR+=$(OUTPUT_ROOT)/infra.a $(OUTPUT_ROOT)/usbxwrap.a $(OUTPUT_ROOT)/rpusbdisp-drv.a 20 | 21 | INCLUDES+= -Iinclude \ 22 | -I$(PRJ_ABS_ROOT)/deps-wraps/libusbx_wrap/include \ 23 | -I$(PREFIX)/include/libusb-1.0 24 | 25 | all: $(DYNAMIC_DEST) 26 | additional_clean: 27 | rm -f $(DYNAMIC_DEST) 28 | 29 | install: $(DYNAMIC_DEST) 30 | install -m 0755 $(DYNAMIC_DEST) $(PREFIX)/lib 31 | tar cf - include | (cd $(PREFIX); tar xf -) 32 | 33 | include $(PRJ_ROOT)/scripts/common.mak 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/rpusbdisp-drv/include/rp/drivers/display/rpusbdisp/enums.h: -------------------------------------------------------------------------------- 1 | // 2 | // enums.h 3 | // rpusbdispsdk 4 | // 5 | // Created by Tony Huang on 12/14/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | enum RoboPeakUsbDisplayBitOperation { 12 | RoboPeakUsbDisplayBitOperationCopy = 0, 13 | RoboPeakUsbDisplayBitOperationXor = 1, 14 | RoboPeakUsbDisplayBitOperationOr = 2, 15 | RoboPeakUsbDisplayBitOperationAnd = 3 16 | }; 17 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/rpusbdisp-drv/include/rp/drivers/display/rpusbdisp/protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RoboPeak Project 3 | * Copyright 2009 - 2013 4 | * 5 | * RP USB Display 6 | * Protocol Def 7 | * 8 | * Initial Version by Shikai Chen 9 | */ 10 | 11 | #pragma once 12 | 13 | 14 | #define RPUSBDISP_DISP_CHANNEL_MAX_SIZE 64 //64bytes 15 | #define RPUSBDISP_STATUS_CHANNEL_MAX_SIZE 32 //32bytes 16 | 17 | 18 | // -- Display Packets 19 | #define RPUSBDISP_DISPCMD_NOPE 0 20 | #define RPUSBDISP_DISPCMD_FILL 1 21 | #define RPUSBDISP_DISPCMD_BITBLT 2 22 | #define RPUSBDISP_DISPCMD_RECT 3 23 | #define RPUSBDISP_DISPCMD_COPY_AREA 4 24 | #define RPUSBDISP_DISPCMD_BITBLT_RLE 5 25 | 26 | 27 | #define RPUSBDISP_OPERATION_COPY 0 28 | #define RPUSBDISP_OPERATION_XOR 1 29 | #define RPUSBDISP_OPERATION_OR 2 30 | #define RPUSBDISP_OPERATION_AND 3 31 | 32 | #if defined(_WIN32) || defined(__ICCARM__) 33 | #pragma pack(1) 34 | #endif 35 | 36 | 37 | #define RPUSBDISP_CMD_MASK (0x3F) 38 | #define RPUSBDISP_CMD_FLAG_CLEARDITY (0x1<<6) 39 | #define RPUSBDISP_CMD_FLAG_START (0x1<<7) 40 | typedef struct _rpusbdisp_disp_packet_header_t { 41 | #if 0 42 | _u8 cmd: 6; 43 | _u8 cleardirty: 1; 44 | _u8 start: 1; 45 | #else 46 | _u8 cmd_flag; 47 | #endif 48 | } __attribute__((packed)) rpusbdisp_disp_packet_header_t; 49 | 50 | 51 | typedef struct _rpusbdisp_disp_fill_packet_t { 52 | rpusbdisp_disp_packet_header_t header; 53 | _u16 color_565; 54 | } __attribute__((packed)) rpusbdisp_disp_fill_packet_t; 55 | 56 | 57 | typedef struct _rpusbdisp_disp_bitblt_packet_t { 58 | rpusbdisp_disp_packet_header_t header; 59 | _u16 x; 60 | _u16 y; 61 | _u16 width; 62 | _u16 height; 63 | _u8 operation; 64 | } __attribute__((packed)) rpusbdisp_disp_bitblt_packet_t; 65 | 66 | 67 | typedef struct _rpusbdisp_disp_fillrect_packet_t { 68 | rpusbdisp_disp_packet_header_t header; 69 | _u16 left; 70 | _u16 top; 71 | _u16 right; 72 | _u16 bottom; 73 | _u16 color_565; 74 | _u8 operation; 75 | } __attribute__((packed)) rpusbdisp_disp_fillrect_packet_t; 76 | 77 | 78 | typedef struct _rpusbdisp_disp_copyarea_packet_t { 79 | rpusbdisp_disp_packet_header_t header; 80 | _u16 sx; 81 | _u16 sy; 82 | _u16 dx; 83 | _u16 dy; 84 | _u16 width; 85 | _u16 height; 86 | } __attribute__((packed)) rpusbdisp_disp_copyarea_packet_t; 87 | 88 | #if defined(_WIN32) || defined(__ICCARM__) 89 | #pragma pack() 90 | #endif 91 | 92 | 93 | // RLE Packet Define 94 | #define RPUSBDISP_RLE_BLOCKFLAG_COMMON_BIT 0x80 95 | #define RPUSBDISP_RLE_BLOCKFLAG_SIZE_BIT 0x7f 96 | 97 | // -- Status Packets 98 | 99 | #define RPUSBDISP_STATUS_TYPE_NORMAL 0 100 | 101 | 102 | #define RPUSBDISP_DISPLAY_STATUS_DIRTY_FLAG 0x80 //a full screen transfer is required 103 | 104 | 105 | #define RPUSBDISP_TOUCH_STATUS_NO_TOUCH 0 106 | #define RPUSBDISP_TOUCH_STATUS_PRESSED 1 107 | 108 | #if defined(_WIN32) || defined(__ICCARM__) 109 | #pragma pack(1) 110 | #endif 111 | 112 | 113 | typedef struct _rpusbdisp_status_packet_header_t { 114 | _u8 packet_type; 115 | } __attribute__((packed)) rpusbdisp_status_packet_header_t; 116 | 117 | 118 | typedef struct _rpusbdisp_status_normal_packet_t { 119 | rpusbdisp_status_packet_header_t header; 120 | _u8 display_status; 121 | _u8 touch_status; 122 | _s32 touch_x; 123 | _s32 touch_y; 124 | } __attribute__((packed)) rpusbdisp_status_normal_packet_t; 125 | 126 | #if defined(_WIN32) || defined(__ICCARM__) 127 | #pragma pack() 128 | #endif 129 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/rpusbdisp-drv/include/rp/drivers/display/rpusbdisp/rle.h: -------------------------------------------------------------------------------- 1 | // 2 | // rle.h 3 | // RLE compression algorithm used by rpusbdisp 4 | // 5 | // Created by Tony Huang on 12/11/13. 6 | // Copyright (c) 2013 RoboPeak.com. All rights reserved. 7 | // 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace rp 14 | { 15 | namespace util 16 | { 17 | 18 | class Buffer; 19 | 20 | } 21 | } 22 | 23 | namespace rp 24 | { 25 | namespace drivers 26 | { 27 | namespace display 28 | { 29 | 30 | /** 31 | * Compress data with RLE algorithm and return the compressed data 32 | */ 33 | std::shared_ptr rleCompress(std::shared_ptr buffer); 34 | 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/scripts/common.mak: -------------------------------------------------------------------------------- 1 | # 2 | # Unified Building System for Linux 3 | # By CSK (csk@live.com) 4 | # 5 | 6 | .SUFFIXES: .o .cpp .s .cc 7 | 8 | .PHONY: make_subs clean install additional_clean 9 | # collect objs to build 10 | OBJ+= $(patsubst %.c, $(OBJ_ROOT)/%.o,$(filter-out %*.c,$(CSRC)) ) 11 | OBJ+= $(patsubst %.cpp, $(OBJ_ROOT)/%.o,$(filter-out %*.cpp,$(CXXSRC))) 12 | OBJ+= $(patsubst %.cc, $(OBJ_ROOT)/%.o,$(filter-out %*.cc,$(CXXCCSRC))) 13 | 14 | 15 | 16 | distclean: additional_distclean clean 17 | 18 | clean: additional_clean 19 | rm -f $(OBJ) 20 | rm -f $(DEP_FILE) 21 | 22 | 23 | $(OBJ_ROOT)/%.o: %.cpp 24 | mkdir -p `dirname $@` 25 | $(CXX) -c $(CXXFLAGS) -fPIC -o $@ $< 26 | 27 | $(OBJ_ROOT)/%.o: %.c 28 | mkdir -p `dirname $@` 29 | $(CC) -c $(CFLAGS) -fPIC -o $@ $< 30 | 31 | $(OBJ_ROOT)/%.o: %.cc 32 | mkdir -p `dirname $@` 33 | $(CXX) -c $(CXXFLAGS) -fPIC -o $@ $< 34 | 35 | 36 | #Dependency builing 37 | $(OBJ_ROOT)/%.d: %.c 38 | mkdir -p `dirname $@` 39 | $(CC) -M $(CFLAGS) $< | sed "s;$(notdir $*).o:;$(OBJ_ROOT)/$*.o $(OBJ_ROOT)/$*.d:;" > $@ 40 | 41 | $(OBJ_ROOT)/%.d: %.cpp 42 | mkdir -p `dirname $@` 43 | $(CXX) -M $(CXXFLAGS) $< | sed "s;$(notdir $*).o:;$(OBJ_ROOT)/$*.o $(OBJ_ROOT)/$*.d:;" > $@ 44 | 45 | $(OBJ_ROOT)/%.d: %.cc 46 | mkdir -p `dirname $@` 47 | $(CXX) -M $(CXXFLAGS) $< | sed "s;$(notdir $*).o:;$(OBJ_ROOT)/$*.o $(OBJ_ROOT)/$*.d:;" > $@ 48 | 49 | $(EXEC_DEST): $(OBJ) $(DEP_AR) 50 | mkdir -p `dirname $@` 51 | $(CC) -o $@ $^ -L$(OUTPUT_ROOT) $(LDFLAGS) 52 | 53 | 54 | $(STATIC_DEST): $(OBJ) 55 | mkdir -p `dirname $@` 56 | @for i in $(OBJ); do echo "$@<=$$i"; $(AR) rcs $@ $$i; done 57 | 58 | $(DYNAMIC_DEST): $(OBJ) $(DEP_AR) 59 | mkdir -p `dirname $@` 60 | $(CC) -fPIC -shared -o $@ $^ -L$(OUTPUT_ROOT) $(LDFLAGS) 61 | 62 | ifneq ($(MAKECMDGOALS), clean) 63 | sinclude $(DEP_FILE) 64 | endif 65 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/scripts/def.mak: -------------------------------------------------------------------------------- 1 | # 2 | # Unified Building System for Linux 3 | # By CSK (csk@live.com) 4 | # 5 | 6 | include $(PRJ_ROOT)/Makefile.conf 7 | 8 | .PHONY: all clean install distclean listsubs 9 | 10 | # Path 11 | PRJ_ABS_ROOT:=$(shell cd $(PRJ_ROOT) && pwd) 12 | 13 | OBJ_PARENT_ROOT:=$(PRJ_ROOT)/build/obj/$(ARCH_PLATFORM) 14 | OBJ_ROOT:=$(OBJ_PARENT_ROOT)/$(MOD_NAME) 15 | OUTPUT_ROOT:=$(PRJ_ROOT)/build/output/$(ARCH_PLATFORM) 16 | 17 | DEP_FILE += $(patsubst %.o, %.d, $(OBJ)) 18 | 19 | 20 | EXEC_FILENAME:=$(MOD_NAME) 21 | EXEC_DEST:=$(OUTPUT_ROOT)/$(EXEC_FILENAME) 22 | 23 | DYNAMIC_FILENAME:=lib$(MOD_NAME).so 24 | DYNAMIC_DEST:=$(OUTPUT_ROOT)/$(DYNAMIC_FILENAME) 25 | 26 | STATIC_FILENAME:=$(MOD_NAME).a 27 | STATIC_DEST:=$(OUTPUT_ROOT)/$(STATIC_FILENAME) 28 | 29 | 30 | # Building Flags 31 | 32 | ifeq ($(OPT_DBG), yes) 33 | OPT_LVL?=-g 34 | CDEFS+= -D_DEBUG 35 | else 36 | OPT_LVL?=-O2 37 | endif 38 | 39 | 40 | ifeq ($(ARCH_PLATFORM), armv7l) 41 | TARGET_DEF:= 42 | else 43 | TARGET_DEF:= 44 | endif 45 | 46 | CDEFS+= -DTARGET_$(ARCH_PLATFORM) 47 | 48 | 49 | 50 | # Dependencies 51 | INCLUDES+= -I. \ 52 | -I$(PRJ_ABS_ROOT) \ 53 | -I$(PRJ_ABS_ROOT)/infra/include \ 54 | -I$(PRJ_ABS_ROOT)/rpusbdisp-drv/include \ 55 | -I$(PRJ_ABS_ROOT)/deps-wraps/libusbx_wrap/include \ 56 | -I$(PREFIX)/include 57 | 58 | RPUSBDISP_LIBS:=-L$(OUTPUT_ROOT) -lrpusbdisp-drv 59 | 60 | DEP_LIBS+= -L$(PREFIX)/lib -lm \ 61 | -ldl \ 62 | -lpthread \ 63 | -lstdc++ \ 64 | -lrt \ 65 | -lusb-1.0 66 | 67 | 68 | 69 | CFLAGS+= $(CDEFS) $(OPT_LVL) $(INCLUDES) $(TARGET_DEF) $(EXTRA_FLAGS) -Wconversion-null 70 | CXXFLAGS+= $(CFLAGS) -std=c++11 71 | 72 | LDFLAGS+= $(DEP_LIBS) -Wl,-rpath-link=$(PREFIX)/lib 73 | 74 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/workspace/vs2013/rpusbdisp_sdk/infra/infra.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {1ee583f9-6d7f-434c-a2f6-3e51538b02a1} 18 | 19 | 20 | {4eee795b-23ac-4e24-8238-e3f35679fca3} 21 | 22 | 23 | {d7af3a6d-eff3-443e-b683-65e2a7ae5e78} 24 | 25 | 26 | 27 | 28 | Header Files\rp\util 29 | 30 | 31 | Header Files\rp\util 32 | 33 | 34 | Header Files\rp\util 35 | 36 | 37 | Header Files\rp\util 38 | 39 | 40 | Header Files\rp\util 41 | 42 | 43 | Header Files\rp\util 44 | 45 | 46 | Header Files\rp 47 | 48 | 49 | 50 | 51 | Source Files\util 52 | 53 | 54 | Source Files\util 55 | 56 | 57 | Source Files\util 58 | 59 | 60 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/workspace/vs2013/rpusbdisp_sdk/rpusbdisp_sdk.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "infra", "infra\infra.vcxproj", "{1CBE35E9-F45D-4A19-B177-BAE9CDE80DE3}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usbdispdrv", "usbdispdrv\usbdispdrv.vcxproj", "{1F47812F-71AC-4FA0-BE6F-136F447959C7}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libusb-1.0 (dll)", "..\..\..\deps\libusbx-1.0.17\msvc\libusb_dll_2012.vcxproj", "{349EE8FA-7D25-4909-AAF5-FF3FADE72187}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usbdispdemo", "usbdispdemo\usbdispdemo.vcxproj", "{5DF573EB-433A-4AB0-91D4-4448DF7852FB}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Win32 = Debug|Win32 17 | Debug|x64 = Debug|x64 18 | Release|Win32 = Release|Win32 19 | Release|x64 = Release|x64 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {1CBE35E9-F45D-4A19-B177-BAE9CDE80DE3}.Debug|Win32.ActiveCfg = Debug|Win32 23 | {1CBE35E9-F45D-4A19-B177-BAE9CDE80DE3}.Debug|Win32.Build.0 = Debug|Win32 24 | {1CBE35E9-F45D-4A19-B177-BAE9CDE80DE3}.Debug|x64.ActiveCfg = Debug|Win32 25 | {1CBE35E9-F45D-4A19-B177-BAE9CDE80DE3}.Release|Win32.ActiveCfg = Release|Win32 26 | {1CBE35E9-F45D-4A19-B177-BAE9CDE80DE3}.Release|Win32.Build.0 = Release|Win32 27 | {1CBE35E9-F45D-4A19-B177-BAE9CDE80DE3}.Release|x64.ActiveCfg = Release|Win32 28 | {1F47812F-71AC-4FA0-BE6F-136F447959C7}.Debug|Win32.ActiveCfg = Debug|Win32 29 | {1F47812F-71AC-4FA0-BE6F-136F447959C7}.Debug|Win32.Build.0 = Debug|Win32 30 | {1F47812F-71AC-4FA0-BE6F-136F447959C7}.Debug|x64.ActiveCfg = Debug|Win32 31 | {1F47812F-71AC-4FA0-BE6F-136F447959C7}.Release|Win32.ActiveCfg = Release|Win32 32 | {1F47812F-71AC-4FA0-BE6F-136F447959C7}.Release|Win32.Build.0 = Release|Win32 33 | {1F47812F-71AC-4FA0-BE6F-136F447959C7}.Release|x64.ActiveCfg = Release|Win32 34 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Debug|Win32.Build.0 = Debug|Win32 36 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Debug|x64.ActiveCfg = Debug|x64 37 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Debug|x64.Build.0 = Debug|x64 38 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Release|Win32.ActiveCfg = Release|Win32 39 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Release|Win32.Build.0 = Release|Win32 40 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Release|x64.ActiveCfg = Release|x64 41 | {349EE8FA-7D25-4909-AAF5-FF3FADE72187}.Release|x64.Build.0 = Release|x64 42 | {5DF573EB-433A-4AB0-91D4-4448DF7852FB}.Debug|Win32.ActiveCfg = Debug|Win32 43 | {5DF573EB-433A-4AB0-91D4-4448DF7852FB}.Debug|Win32.Build.0 = Debug|Win32 44 | {5DF573EB-433A-4AB0-91D4-4448DF7852FB}.Debug|x64.ActiveCfg = Debug|Win32 45 | {5DF573EB-433A-4AB0-91D4-4448DF7852FB}.Release|Win32.ActiveCfg = Release|Win32 46 | {5DF573EB-433A-4AB0-91D4-4448DF7852FB}.Release|Win32.Build.0 = Release|Win32 47 | {5DF573EB-433A-4AB0-91D4-4448DF7852FB}.Release|x64.ActiveCfg = Release|Win32 48 | EndGlobalSection 49 | GlobalSection(SolutionProperties) = preSolution 50 | HideSolutionNode = FALSE 51 | EndGlobalSection 52 | EndGlobal 53 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/workspace/vs2013/rpusbdisp_sdk/usbdispdemo/usbdispdemo.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /rpusbdisp/drivers/usermode-sdk/workspace/xcode/rpusbdispsdk/rpusbdispsdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/.version: -------------------------------------------------------------------------------- 1 | 1.0 (2013-11-17) 2 | -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/README.md: -------------------------------------------------------------------------------- 1 | # Introduction # 2 | 3 | RoboPeak USB Display Linux Driver Arm Suite is used to enable RoboPeak USB Display on ubuntu for arm (linaro) on arm SoCs. 4 | 5 | 6 | # Install # 7 | 8 | Use scp to copy `arm_suite.tar.bz2` to the host: 9 | 10 | $ scp arm_suite.tar.bz2 ubuntu@your_mini_pc/arm_suite.tar.bz2 11 | 12 | And than connect to your host via ssh to install the driver: 13 | 14 | $ ssh -l ubuntu your_mini_pc 15 | $ tar xf arm_suite.tar.bz2 16 | $ cd arm_suite 17 | $ sudo ./rpusbdisp_arm_tool.sh install 18 | $ sudo ./rpusbdisp_arm_tool.sh auto_load 19 | 20 | This will install prebuilt driver to the mini pc, as well as `lightdm` configuration and `upstart` configuration 21 | 22 | 23 | # Usage # 24 | 25 | Just reboot your mini pc by: 26 | 27 | $ sudo reboot 28 | 29 | The driver will be loaded automatically on system startup 30 | 31 | When you plug in your RoboPeak USB Display, the driver daemon will automatically configure `lightdm`, and restart it. This will also happen when you unplug your device. 32 | 33 | * NOTE: Every time you plug in or pull out your RoboPeak USB Display, the driver daemon will restart `lightdm`, so your current GUI login session will be dropped * 34 | 35 | 36 | # Homebrew # 37 | 38 | If there is no prebuilt driver available for your device/kernel combination, you may build the kernel driver on your own, for detailed information please refer to our repository hosted on GitHub: 39 | 40 | 41 | 42 | # Copyright & Contact # 43 | 44 | Copyright (c) 2013 RoboPeak.com 45 | If you have any question or advice, please make us know. We will be very thankful if you contact us: 46 | 47 | 48 | -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/conf/10-disp.conf: -------------------------------------------------------------------------------- 1 | Section "Device" 2 | Identifier "RPUSBDispFB" 3 | Driver "fbdev" 4 | Option "fbdev" "/dev/fb0" 5 | EndSection 6 | 7 | 8 | Section "Screen" 9 | Identifier "RPUSBDisp" 10 | Device "RPUSBDispFB" 11 | DefaultFbBpp 16 12 | SubSection "Display" 13 | Visual "TrueColor" 14 | EndSubSection 15 | EndSection 16 | 17 | 18 | Section "InputClass" 19 | Identifier "RPUSBTouch" 20 | MatchDevicePath "/dev/input/event*" 21 | Driver "evdev" 22 | EndSection 23 | -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/conf/rpusbdisp.conf: -------------------------------------------------------------------------------- 1 | # rpusbdisp - RoboPeak USB Display daemon 2 | # 3 | # The daemon process of RoboPeak USB Display. 4 | 5 | description "Rp USB Display" 6 | 7 | start on filesystem or runlevel [!06] 8 | stop on runlevel [016] 9 | 10 | respawn 11 | respawn limit 10 5 12 | umask 022 13 | 14 | # 'sshd -D' leaks stderr and confuses things in conjunction with 'console log' 15 | console none 16 | 17 | # if you used to set SSHD_OPTS in /etc/default/ssh, you can change the 18 | # 'exec' line here instead 19 | exec /etc/init.d/rpusbdispd start 20 | -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/kernel_modules.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/rpusbdisp/tools/arm_suite/kernel_modules.tar.bz2 -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/rpusbdisp_arm_tool.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | echo "RoboPeak USB Display Arm Suite" 4 | echo "Version $(cat .version)" 5 | echo "Copyright (c) 2013 RoboPeak.com" 6 | echo 7 | 8 | if [ ! -e kernel_modules ]; then 9 | echo "Decompressing kernel modules..." 10 | tar xf kernel_modules.tar.bz2 11 | fi 12 | 13 | function install_kernel_module { 14 | echo "Installing kernel module..." 15 | echo "Please enter your board type (pcduino, cubieboard, cubieboard2...):" 16 | read 17 | BOARD_TYPE=$REPLY 18 | KERNEL_VERSION=$(uname -r) 19 | 20 | MODULE_PATH=kernel_modules/${BOARD_TYPE}/${KERNEL_VERSION}/rp_usbdisplay.ko 21 | 22 | if [ ! -f $MODULE_PATH ]; then 23 | echo "No suitable kernel module found for board '$BOARD_TYPE' and kernel version '$KERNEL_VERSION'" 24 | echo "Please contact support@robopeak.com to request your combination or compile it by yourself" 25 | exit 1 26 | fi 27 | 28 | INSTALL_PATH=/lib/modules/${KERNEL_VERSION}/kernel/rp_usbdisplay.ko 29 | 30 | if [ -e $INSTALL_PATH ]; then 31 | echo "File '$INSTALL_PATH' already exist, override it?" 32 | read 33 | if [ "$REPLY" != "yes" ]; then 34 | exit 1; 35 | fi 36 | fi 37 | 38 | echo "Installing" 39 | echo " From: $MODULE_PATH" 40 | echo " To: $INSTALL_PATH" 41 | install "$MODULE_PATH" "$INSTALL_PATH" || exit 1 42 | 43 | if [ ! -e $INSTALL_PATH ]; then 44 | echo "Failed to install kernel module" 45 | exit 1; 46 | fi 47 | 48 | depmod -a || exit 1 49 | } 50 | 51 | function auto_load { 52 | echo "Setting up rpusbdisp daemon..." 53 | 54 | mkdir -p /etc/rpusbdisp || exit 1 55 | cp scripts/rpusbdispd.sh /etc/rpusbdisp || exit 1 56 | cp scripts/rpusbdispd /etc/init.d || exit 1 57 | cp conf/10-disp.conf /etc/rpusbdisp || exit 1 58 | cp conf/rpusbdisp.conf /etc/init || exit 1 59 | initctl reload-configuration || exit 1 60 | 61 | echo "Done" 62 | } 63 | 64 | case "$1" in 65 | install_kernel_module) 66 | install_kernel_module 67 | ;; 68 | auto_load) 69 | auto_load 70 | ;; 71 | *) 72 | echo "Unknown command '$1'" 73 | echo "Supported commands:" 74 | echo " install_kernel_module" 75 | echo " auto_load" 76 | 77 | exit 1 78 | ;; 79 | esac 80 | 81 | -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/scripts/rpusbdispd: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | # upstart-job 3 | 4 | case "$1" in 5 | start) 6 | /etc/rpusbdisp/rpusbdispd.sh start & 7 | ;; 8 | stop) 9 | /etc/rpusbdisp/rpusbdispd.sh stop & 10 | ;; 11 | restart) 12 | start 13 | stop 14 | ;; 15 | esac 16 | -------------------------------------------------------------------------------- /rpusbdisp/tools/arm_suite/scripts/rpusbdispd.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | CONF_FILE_SOURCE=/etc/rpusbdisp/10-disp.conf 4 | CONF_FILE_TARGET=/usr/share/X11/xorg.conf.d/10-disp.conf 5 | 6 | function ensure_conf_exist { 7 | if [ ! -f "$CONF_FILE_TARGET" ]; then 8 | echo "Config doesn't exist creating one..." 9 | /etc/init.d/lightdm stop 10 | cp "$CONF_FILE_SOURCE" "$CONF_FILE_TARGET" 11 | fi 12 | } 13 | 14 | function ensure_conf_not_exist { 15 | if [ -f "$CONF_FILE_TARGET" ]; then 16 | echo "Removing disp conf..." 17 | /etc/init.d/lightdm stop 18 | rm -f "$CONF_FILE_TARGET" 19 | fi 20 | } 21 | 22 | function ensure_fb_id { 23 | RP_USB_DISP_FB_ID=$1 24 | HAS_CORRECT_FB_ID=$(cat $CONF_FILE_TARGET | grep /dev/fb${RP_USB_DISP_FB_ID}) 25 | if [ "$HAS_CORRECT_FB_ID" == "" ]; then 26 | echo "fb id error, correcting fb id to $RP_USB_DISP_FB_ID..." 27 | /etc/init.d/lightdm stop 28 | cat "$CONF_FILE_SOURCE" | sed -E "s/\/dev\/fb[0-9]+/\/dev\/fb${RP_USB_DISP_FB_ID}/g" > "$CONF_FILE_TARGET" 29 | fi 30 | } 31 | 32 | function ensure_lightdm_running { 33 | LIGHT_DM_RUNNING=$(ps -A | grep lightdm | tail -n 1) 34 | if [ "${LIGHT_DM_RUNNING}" == "" ]; then 35 | echo "lightdm stopped, starting..." 36 | /etc/init.d/lightdm start 37 | fi 38 | } 39 | 40 | function daemon { 41 | while [ -e /tmp/rpusbdispd.run ]; do 42 | RP_USB_DISP_FB_ID=$(cat /proc/fb | grep rp | sed -E 's/^([0-9]+)\s.*$/\1/') 43 | STATUS=$(dmesg | grep "RP USB Display" | tail -n 1 | grep "found") 44 | if [ "$STATUS" != "" ]; then 45 | echo "Rp usb display detected: $RP_USB_DISP_FB_ID" 46 | ensure_conf_exist 47 | ensure_fb_id $RP_USB_DISP_FB_ID 48 | else 49 | echo "No rp usb display detected" 50 | ensure_conf_not_exist 51 | fi 52 | ensure_lightdm_running 53 | sleep 1 54 | done 55 | } 56 | 57 | 58 | function start { 59 | if [ -e /tmp/rpusbdispd.run ]; then 60 | echo "rpusbdispd already running" 61 | exit 1 62 | fi 63 | 64 | KERNEL_MODULE_LOADED=$(lsmod | grep rp_usbdisplay) 65 | 66 | if [ "$KERNEL_MODULE_LOADED" == "" ]; then 67 | modprobe -f rp_usbdisplay 68 | fi 69 | 70 | touch /tmp/rpusbdispd.run 71 | daemon 72 | } 73 | 74 | function stop { 75 | if [ ! -e /tmp/rpusbdispd.run ]; then 76 | echo "rpusbdispd is not running" 77 | exit 1 78 | fi 79 | 80 | rm -rf /tmp/rpusbdispd.run 81 | } 82 | 83 | case "$1" in 84 | start) 85 | start 86 | ;; 87 | stop) 88 | stop 89 | ;; 90 | *) 91 | echo "rpusbdispd.sh [start|stop]" 92 | exit 1 93 | ;; 94 | esac 95 | 96 | -------------------------------------------------------------------------------- /tinyusb.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chuanjinpang/esp32s2_usb_display/b9acbce791deb0c50a6f3f09446a52992a13fb1a/tinyusb.tgz --------------------------------------------------------------------------------