-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
68 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
// use esp_idf_svc::wifi::{AsyncWifi, EspWifi}; | ||
use lazy_static::lazy_static; | ||
use std::sync::{ | ||
mpsc::{self, Receiver, Sender}, | ||
// mpsc::{self, Receiver, Sender}, | ||
Mutex, | ||
}; | ||
|
||
lazy_static! { | ||
pub static ref WIFI_CONFIGURED: Mutex<bool> = Mutex::new(false); | ||
pub static ref TIME_SYNCED: Mutex<bool> = Mutex::new(false); | ||
// pub static ref WIFI: Mutex<Arc<AsyncWifi<EspWifi<'static>>>> = Mutex::new(None); | ||
|
||
// mpsc 채널을 Mutex로 감싸서 전역으로 선언 | ||
pub static ref CHAN_NET: (Mutex<Sender<String>>, Mutex<Receiver<String>>) = { | ||
let (tx, rx) = mpsc::channel(); | ||
(Mutex::new(tx), Mutex::new(rx)) | ||
}; | ||
pub static ref CMD_NET: Mutex<String> = Mutex::new(String::new()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.