rsiot/components/cmp_linux_uart_master/
mod.rs

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

mod component;
mod config;
mod error;
mod fn_process;
mod uart_comm;

pub use crate::components_config::uart_general::*;
pub use component::Cmp;
pub use config::*;
pub use error::Error;

type Result<T> = std::result::Result<T, Error>;