Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom baud rates #19

Open
wants to merge 1 commit into
base: v2.x
Choose a base branch
from
Open

Custom baud rates #19

wants to merge 1 commit into from

Conversation

jorisvergeer
Copy link

Hi,

I saw some todos regarding custom baud rates in your code.

I needed baud rate 345600 which is not a supported baud rate.

Here is a pull request with code for custom baud rates. I using information from:
http://www.home.unix-ag.org/simon/files/serial-linux.c
and
https://github.com/torvalds/linux/blob/master/drivers/usb/serial/ftdi_sio.c

It runs now for 5 minutes on my machine using a FTDI chip.

commit ca3966446039aa557ff5eda364fbc97de7a35898
Author: vagrant <vagrant@vagrant.vm>
Date:   Tue Apr 11 16:10:17 2017 +0000

    Fix build issues and a missed check

commit 9ee3d50cc581053b05e380b6eb6454ee19150e26
Author: Joris Vergeer <j.vergeer@agis.nl>
Date:   Tue Apr 11 18:01:20 2017 +0200

    Custom baud
@jcurl
Copy link
Owner

jcurl commented Apr 11, 2017

Cool! Be patient while I get around to testing it with the serial devices I have. I'm hoping over the Easter break.

@jorisvergeer jorisvergeer changed the title Squashed commit of the following: Custom baud rates Apr 11, 2017
@jorisvergeer
Copy link
Author

I might need to add some cleanup code around the close event

@jorisvergeer
Copy link
Author

Also I was a bit lazy with returned errors

@jcurl
Copy link
Owner

jcurl commented Apr 11, 2017

I was also thinking, because the custom baudrate is OS specific, it might make sense to put it in its own file, and have the CMakeLists.txt compile the file depending on the OS it detects.

@jcurl
Copy link
Owner

jcurl commented Apr 11, 2017

What chipsets have you already tested with, and what OS are you using?

@jorisvergeer
Copy link
Author

There might only be a handful of drivers that support the custom_divisor stuff although I am not sure.

@jorisvergeer
Copy link
Author

jorisvergeer commented Apr 11, 2017

I only tested with FTDI.
Windows uses its own implementation. I only touched the linux part.
It works on Windows and Linux in my machine ;)

@jcurl
Copy link
Owner

jcurl commented Apr 11, 2017

I have PL2303, an original 16550A in my laptop docking station and another USB (SCM2xxx) that I'll test with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants