rsiot/components/cmp_linux_uart_master/
mod.rs

1//! Коммуникация через интерфейс uart под ОС Linux
2//!
3//! ## Для raspberry
4//!
5//! Чтобы использовать UART0, необходимо деактивировать Bluetooth
6//!
7//! Отключить блютуз в файле `/boot/firmware/config.txt`, добавить строку:
8//!
9//! ```
10//! dtoverlay=disable-bt
11//! ```
12//!
13//! Деактивировать сервисы:
14//!
15//! ```bash
16//! sudo systemctl disable hciuart.service
17//! sudo systemctl disable bluetooth.service
18//! ```
19//!
20//! Перезагрузить систему
21//!
22//! Теперь в системе будет интерфейс `ttyAMA0`:
23//!
24//! ```bash
25//! ls -l /dev/serial*
26//! ```
27
28mod component;
29mod config;
30mod error;
31mod fn_process;
32mod uart_comm;
33
34pub use crate::components_config::uart_general::*;
35pub use component::Cmp;
36pub use config::*;
37pub use error::Error;
38
39type Result<T> = std::result::Result<T, Error>;