tokio-modbus
tokio-modbus copied to clipboard
How to turn 'tokio_serial::SerialStream' into global static to save it for reuse
main
I want to pass the obtained 'SerialStream' to 'PORT' in 'match 0', and then pass 'PORT' to 'attach_slave()' in 'match 1'. This way you don’t have to reopen the serial port every time you read.
other
What should I write in 'tauri::async_runtime::Mutex::new()'?