prof-braino / propforth

Automatically exported from code.google.com/p/propforth
3 stars 0 forks source link

update Linux_serial.go for 230400 #153

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
You need to update the code in linux_serial.go to support 230400. (to be 
completely correct, you should update the .go file in src/linux_serial and then 
copy it to /src/serial)
The windows code is different and doesn't have the switch/case for baud rates.

old code:

Code:

if err == nil {
            switch baud {
            case 115200:
                speed = C.B115200
            case 57600:
                speed = C.B57600

            case 19200:
                speed = C.B19200

New code:
Code:

if err == nil {
            switch baud {
            case 230400:
                speed = C.B230400
            case 115200:
                speed = C.B115200
            case 57600:
                speed = C.B57600

            case 19200:
                speed = C.B19200

just add another case to the switch statement.

When done, make sure the updated linux_serial.go gets copied into src/serial 
and the do an install on goterm and gomuxterm. It should recognize 230400 at 
this point. Mine did.

Original issue reported on code.google.com by prof.bra...@gmail.com on 4 Jun 2012 at 2:00

GoogleCodeExporter commented 8 years ago
Tested and works on 

OLPC fedora  (braino)

and 

Fedora 16 linux for PC (Rick)

Original comment by prof.bra...@gmail.com on 4 Jun 2012 at 8:44