UsbSerial icon indicating copy to clipboard operation
UsbSerial copied to clipboard

CH341-Android-SPI-I2C-Driver

Open rtek1000 opened this issue 4 years ago • 0 comments

How to use the SPI interface (BETA) Support for USB to SPI devices was added recently but it is still in beta. Although I tried to keep the api as close to standard UsbSerial api as possible, be aware because the beta nature of this feature this api may change in the future. Only CP2130 chipset is supported at the moment.

CH341 also has SPI and I2C port, sample code works with Activity, would be very interesting if it could work with Service, maybe these functions can be added to this library:

The CH341 is a USB bus adapter that provides asynchronous UART, parallel port, and common 2-wire and 4-wire synchronous serial interfaces via the USB bus. In the parallel port mode, an EPP/MEM 8-bit parallel interface is provided, and the commonly used synchronous serial interface mainly includes a 2-wire IIC, a 4-wire SPI, and the like. This document mainly introduces the Java Driver Library of CH341USB to EPP, MEM, IIC, SPI mode (hereinafter referred to as CH341PAR), and how to use the APK to operate CH341PAR for data communication under Android. The driver is based on the Android USB Host protocol, and the user can call the provided interface API to communicate with the Android USB Host.

https://github.com/boseji/CH341-Store/files/3741307/CH341PAR_Android_Dvlp_Guide_en.pdf

https://github.com/boseji/CH341-Store/tree/master/CH341-Android-SPI-I2C-Driver%2BSDK-lib%2BAPK

rtek1000 avatar Oct 26 '19 19:10 rtek1000