Giter Club home page Giter Club logo

ch341par_linux's Introduction

ch341/ch347/ch339 linux SDK

Description

This directory contains 3 parts, usb device driver, application library and examples. This driver and applications support usb bus interface chip ch341/ch347/ch339.

ch341 implements full-speed usb to uart/spi/i2c/gpio/parport/etc., ch347 implements high-speed usb to uart/jtag/swd/spi/i2c/gpio/etc., ch339 implements high-speed usb hub/card reader/ethernet and usb to uart/jtag/spi/i2c/gpio/etc., This driver is not applicable to uart.

Driver Operating Overview

  1. Open "Terminal"
  2. Switch to "driver" directory
  3. Compile the driver using "make", you will see the module "ch34x_pis.ko" if successful
  4. Type "sudo make load" or "sudo insmod ch34x_pis.ko" to load the driver dynamically
  5. Type "sudo make unload" or "sudo rmmod ch34x_pis.ko" to unload the driver
  6. Type "sudo make install" to make the driver work permanently
  7. Type "sudo make uninstall" to remove the driver

Before the driver works, you should make sure that the ch341/ch347/ch339 device has been plugged in and is working properly, you can use shell command "lsusb" or "dmesg" to confirm that, VID of ch341/ch347/ch339 is [1A86].

If ch341/ch347/ch339 device works well, the driver will created devices named "ch34x_pis*" in /dev directory.

Application Operating Overview

  1. Copy the dynamic library in "lib" directory to system default library path: "sudo cp libch347.so /usr/lib"
  2. Switch to "demo" directory
  3. Type "gcc ch347_demo.c -o app -lch347" to compile the demo

Note

ch341 supports 3 modes:

mode0: [uart]

mode1: [spi + i2c + parallel + gpio]

mode2: [printer]

ch347t supports 4 modes:

mode0: [uart * 2] in vcp/cdc driver mode, the devices are named /dev/tty*

mode1: [spi + i2c + uart * 1] in vcp driver mode, the devices are named /dev/ch34x_pis* and /dev/tty*

mode2: [spi + i2c + uart * 1] in hid driver mode, the devices are named /dev/hidraw*

mode3: [jtag + uart * 1] in vcp driver mode, the devices are named /dev/ch34x_pis* and /dev/tty*

ch347f supports 1 mode:

mode0: [uart * 2 + spi + i2c + jtag] in vcp driver mode, the devices are named /dev/ch34x_pis* and /dev/tty*

ch339w supports many modes:

when the mode supports uart/jtag/spi/i2c/gpio in vcp driver mode, the devices are named /dev/ch34x_pis* and /dev/tty*, the details you can refer to the datasheet.

This driver only can be used with ch341 mode1, ch347t mode1/mode3, ch347f, several modes of ch339w.

This application library and examples can be used with all modes.

Any question, you can send feedback to mail: [email protected]

ch341par_linux's People

Contributors

soldierjazz avatar wchsoftgroup 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.