Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
fangpenlin committed Jan 4, 2025
1 parent 8f830f8 commit 6baddff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@ use embedded_svc::{
utils::io,
};
use esp_idf_svc::eventloop::EspSystemEventLoop;
use esp_idf_svc::hal::gpio::{Input, InputPin, InterruptType, PinDriver, Pull};
use esp_idf_svc::hal::gpio::{PinDriver, Pull};
use esp_idf_svc::hal::modem;
use esp_idf_svc::hal::prelude::Peripherals;
use esp_idf_svc::hal::task::block_on;
use esp_idf_svc::http::client::EspHttpConnection;
use esp_idf_svc::nvs::EspDefaultNvsPartition;
use esp_idf_svc::sys::{
esp, esp_partition_find_first, esp_partition_subtype_t_ESP_PARTITION_SUBTYPE_DATA_FAT,
esp_partition_type_t_ESP_PARTITION_TYPE_DATA, esp_vfs_fat_mount_config_t, tinyusb_config_t,
tinyusb_driver_install, tinyusb_msc_event_t, tinyusb_msc_spiflash_config_t,
tinyusb_msc_storage_init_spiflash, tinyusb_msc_storage_mount, tinyusb_msc_storage_unmount,
wl_handle_t, wl_mount,
};
use esp_idf_svc::timer::EspTaskTimerService;
use esp_idf_svc::wifi::{AsyncWifi, AuthMethod, ClientConfiguration, Configuration, EspWifi};
use std::ffi::CString;
use std::time::Duration;
use std::{fs, thread};

Expand Down
2 changes: 1 addition & 1 deletion src/usb/msc_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl MSCDevice {
.with_context(|| format!("Failed to mount storage at {}", self.base_path))?;

let tusb_cfg = tinyusb_config_t::default();
esp!(unsafe { (tinyusb_driver_install(&tusb_cfg)) })
esp!(unsafe { tinyusb_driver_install(&tusb_cfg) })
.with_context(|| "Failed to install TinyUSB driver")?;

log::info!("TinyUSB driver installed.");
Expand Down

0 comments on commit 6baddff

Please sign in to comment.