Git Product home page Git Product logo

ch347_vcp's Introduction

ch347_vcp

Linux kernel drivers for vendor class protocols of CH347

Set has four drivers -- base is MFD (mfd-ch347.ko), and on top of it are I2C, GPIO and SPI drivers (Modes 1 and 3).

CH347 can also do UART(s), which are handled independently (in parallel to these drivers) by either standard USB CDC driver or by common W-CH driver for all their UARTs.

JTAG support is handled in userspace via openFPGALoader (open source) or binary driver for OpenOCD released by W-CH.

I2C (i2c-ch347.ko)

Driver behaves as an ordinary I2C master controller, e.g. i2c-tools work with it and it is possible to add slave devices via usual methods.

GPIO (gpio-ch347.ko)

Driver controls 8 pins, there is no check if these pins are used by any other protocol

GPIO PIN UART0/1 SPI JTAG I2C
0 6 CTS0 SCK TCK
1 7 RTS0 MISO TDO
2 5 DSR0 SCS0 TMS
3 11 RI0 SCL
4 15 DCD0/ACT
5 9 TNOW0/DTR0 SCS1 TRST
6 2 CTS1
7 13 RTS1

SPI (spi-ch347.ko)

Driver adds new SPI master controller with speeds up to 60MHz and 2 slaves. If your setup does not support such frequencies (think "dupont" wires), decrease frequency when adding slave devices.

To add a slave device you should send string containing device driver name, chip select number and optionally frequency into "new_device" file in sysfs directory of the driver.

echo "spi-nor 0 15000" > /sys/class/.../spi2/new_device

ch347_vcp's People

Contributors

aystarik avatar namedun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.