Skip to content

Commit fc6d0f6

Browse files
author
Dane Slattery
committed
Pass buffer into SimModem::negotiate and EspModem::run
1 parent 35f9887 commit fc6d0f6

File tree

2 files changed

+185
-47
lines changed

2 files changed

+185
-47
lines changed

examples/lte_modem.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ fn main() -> anyhow::Result<()> {
4848
)?;
4949
log::info!("Hello");
5050
let mut sim_device = SIM7600::new();
51-
match sim_device.negotiate(&mut serial) {
51+
let buff = [0u8; 64];
52+
match sim_device.negotiate(&mut serial, buff) {
5253
Err(x) => log::error!("Error = {}", x),
5354
Ok(()) => log::info!("Device in PPP mode"),
5455
}
@@ -57,7 +58,7 @@ fn main() -> anyhow::Result<()> {
5758

5859
let _scope = std::thread::scope::<_, anyhow::Result<()>>(|s| {
5960
let my_thread: ScopedJoinHandle<anyhow::Result<()>> = s.spawn(|| {
60-
match modem.run() {
61+
match modem.run(buff) {
6162
Err(x) => log::error!("Error: {:?}", x),
6263
Ok(_x) => (),
6364
};

0 commit comments

Comments
 (0)