Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrojean-ledger committed May 27, 2024
1 parent 2c36722 commit 9059d93
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
22 changes: 1 addition & 21 deletions ledger_device_sdk/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,6 @@ impl Comm {
T: TryFrom<ApduHeader>,
Reply: From<<T as TryFrom<ApduHeader>>::Error>,
{
// if self.event_pending {
// self.event_pending = false;
// if let Some(value) = self.check_event() {
// return value;
// }
// }

let mut spi_buffer = [0u8; 128];

unsafe {
Expand Down Expand Up @@ -285,27 +278,14 @@ impl Comm {
T: TryFrom<ApduHeader>,
Reply: From<<T as TryFrom<ApduHeader>>::Error>,
{
// if self.event_pending {
// let event: Option<Event<T>> = self.check_event();
// if event.is_some() {
// return true;
// }
// }

let mut spi_buffer = [0u8; 128];

// unsafe {
// G_io_app.apdu_state = APDU_IDLE;
// G_io_app.apdu_media = IO_APDU_MEDIA_NONE;
// G_io_app.apdu_length = 0;
// }

// Signal end of command stream from SE to MCU
// And prepare reception
if !sys_seph::is_status_sent() {
sys_seph::send_general_status();
}
// Fetch the next message from the MCU }
// Fetch the next message from the MCU
let _rx = sys_seph::seph_recv(&mut spi_buffer, 0);
return self.detect_apdu::<T>(&mut spi_buffer);
}
Expand Down
1 change: 0 additions & 1 deletion ledger_secure_sdk_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ fn retrieve_sdk_git_info(bolos_sdk: &Path) -> (String, String) {
}

fn retrieve_makefile_infos(bolos_sdk: &Path) -> Result<(Option<u32>, String), SDKBuildError> {
println!("SDK path: {:?}", bolos_sdk);
let makefile_defines =
File::open(bolos_sdk.join("Makefile.defines")).expect("Could not find Makefile.defines");
let mut api_level: Option<u32> = None;
Expand Down
4 changes: 1 addition & 3 deletions ledger_secure_sdk_sys/sdk_flex.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@
#define __IO volatile
#define IO_USB_MAX_ENDPOINTS 6
#define IO_SEPROXYHAL_BUFFER_SIZE_B 128
#define main _start


#define main _start

0 comments on commit 9059d93

Please sign in to comment.