You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the S Bus protocol it required to use speed of 10000bps. Quick look in lib code make sure that all speeds are settings by macro. It will great to opportunity to add custom speeds in lib. Is it possible?
Uart::with_path("/dev/ttyAMA0",100000,Parity::Even,8,2).expect("COULD SET UART");
Gives me error
thread 'main' panicked at 'COULDSETUART:InvalidValue', src/main.rs:8:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
All code
use rppal::uart::{Parity,Uart};use std::time::Duration;fnmain(){letmut uart =
Uart::with_path("/dev/ttyAMA0",1000000,Parity::Even,8,2).expect("COULD SET UART");
uart.set_read_mode(1,Duration::default()).expect("COULD SET UART MODE");}
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. Unfortunately this is a limitation of the underlying termios functions cfsetispeed() and cfsetospeed() which are used to set the speed, and only support the currently available values. termios2 does support custom speeds, but isn't officially supported for musl targets, which would cause incompatibility issues depending on which libc is used. However, since things may have changed since I last worked on the uart code, I'll take another look after 0.12.0 has been released.
Using the S Bus protocol it required to use speed of 10000bps. Quick look in lib code make sure that all speeds are settings by macro. It will great to opportunity to add custom speeds in lib. Is it possible?
Gives me error
All code
The text was updated successfully, but these errors were encountered: