PaulStoffregen / USBHost_t36

USB Host Library for Teensy 3.6 and 4.0
167 stars 86 forks source link

Serial ch341 plus #11

Closed KurtE closed 6 years ago

KurtE commented 6 years ago

This Pull request. Added support for CH341 based serial adapters. Note: I may not fully handle all combinations of these especially as it has to do with Format. But I think I have more support for the format parameters than some Linux drivers.

As implied above. This pull request has some support for being able to do userial.begin() then do a userial.end() and then do a different userial.begin()...

As part of the begin/end stuff added some support for the Format parameter of the begin. So far I have only tested some with: 8N1, 8N2, 7E1, 7O1.

I have the format parameter set as a set of bits (5 bits for bits) as some of these adapters mention support for 16 bit writes. There are 3 bits for Parity. and 1 or 2 bits for stop bits...

KurtE commented 6 years ago

Went ahead and added some support for the Silicon Labs CP210x boards. I used their pdf describing their USB packets: https://www.silabs.com/documents/public/application-notes/AN571.pdf