Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to turn 'tokio_serial::SerialStream' into global static to save it for reuse #224

Open
xiaguangbo opened this issue Sep 28, 2023 · 0 comments
Labels

Comments

@xiaguangbo
Copy link

image

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()'?

@xiaguangbo xiaguangbo changed the title How to turn 'xxx' into global static static to save it for reuse How to turn 'tokio_serial::SerialStream' into global static static to save it for reuse Sep 28, 2023
@xiaguangbo xiaguangbo changed the title How to turn 'tokio_serial::SerialStream' into global static static to save it for reuse How to turn 'tokio_serial::SerialStream' into global static to save it for reuse Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants