Fixes for some unsuccessful checks

This commit is contained in:
Mirna
2020-10-12 16:01:22 +02:00
parent 929aaf3ba2
commit 00ab3c8877
3 changed files with 11 additions and 19 deletions

View File

@@ -1,7 +1,9 @@
extern crate alloc;
extern crate lang_items;
use core::fmt::Write;
use libtock_drivers::console::Console;
use libtock_drivers::nfc;
// use libtock_drivers::nfc;
fn main() {
let mut console = Console::new();

View File

@@ -3,9 +3,9 @@
pub mod buttons;
pub mod console;
pub mod led;
pub mod nfc;
pub mod result;
pub mod rng;
pub mod timer;
pub mod usb_ctap_hid;
pub mod util;
pub mod nfc;

View File

@@ -31,12 +31,7 @@ pub fn disable_emulation() {
}
pub fn emulate(enabled: bool) -> bool {
let result_code = syscalls::command(
DRIVER_NUMBER,
command_nr::EMULATE,
enabled as usize,
0
);
let result_code = syscalls::command(DRIVER_NUMBER, command_nr::EMULATE, enabled as usize, 0);
if result_code.is_err() {
return false;
}
@@ -61,12 +56,7 @@ pub fn selected() -> bool {
}
pub fn configure(tag_type: u8) -> bool {
let result_code = syscalls::command(
DRIVER_NUMBER,
command_nr::CONFIGURE,
tag_type as usize,
0
);
let result_code = syscalls::command(DRIVER_NUMBER, command_nr::CONFIGURE, tag_type as usize, 0);
if result_code.is_err() {
return false;
}