Skip to content

Commit 411e4aa

Browse files
committed
fix: removing esp channel
1 parent cdef3e0 commit 411e4aa

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

lib/rgb-led/rust-toolchain.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/wifi/rust-toolchain.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

rust-toolchain.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/vs1053.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn contains(str: *const u8, substr: &str) -> bool {
5151
}
5252

5353
// Create a CStr from the raw pointer
54-
let c_str = CStr::from_ptr(str as *const i8);
54+
let c_str = CStr::from_ptr(str);
5555

5656
// Convert the CStr to a Rust &str
5757
if let Ok(str_slice) = c_str.to_str() {
@@ -272,7 +272,7 @@ where
272272
// SPI Clock to 4 MHz. Now you can set high speed SPI clock.
273273

274274
// FASTSPI
275-
self.write_register(true, SCI_MODE, _bv!(SM_SDINEW) | _bv!(SM_LINE1))?;
275+
self.write_register(true, SCI_MODE, (_bv!(SM_SDINEW)) | (_bv!(SM_LINE1)))?;
276276
log::info!("Pre test_comm fast");
277277
let _ =
278278
self.test_comm("Fast SPI, Testing VS1053 read/write registers again...\n".as_ptr());
@@ -507,13 +507,13 @@ where
507507

508508
self.sdi_send_fillers(2052);
509509
sleep(Duration::from_millis(10));
510-
let _ = self.write_register(true, SCI_MODE, _bv!(SM_SDINEW) | _bv!(SM_CANCEL));
510+
let _ = self.write_register(true, SCI_MODE, (_bv!(SM_SDINEW)) | (_bv!(SM_CANCEL)));
511511
for i in 0..=200 {
512512
self.sdi_send_fillers(32);
513513
modereg = self
514514
.read_register(SCI_MODE)
515515
.expect("Failed to read SCI_MODE in stop_song()"); // Read status
516-
if (modereg & _bv!(SM_CANCEL)) == 0 {
516+
if (modereg & (_bv!(SM_CANCEL))) == 0 {
517517
self.sdi_send_fillers(2052);
518518
log::info!("Song stopped correctly after {:?} msec\n", i * 10);
519519
return;
@@ -525,7 +525,7 @@ where
525525

526526
fn soft_reset(&mut self) {
527527
log::info!("Performing soft-reset\n");
528-
let _ = self.write_register(true, SCI_MODE, _bv!(SM_SDINEW) | _bv!(SM_RESET));
528+
let _ = self.write_register(true, SCI_MODE, (_bv!(SM_SDINEW)) | (_bv!(SM_RESET)));
529529
sleep(Duration::from_millis(10));
530530
let _ = self.await_data_request();
531531
}

0 commit comments

Comments
 (0)