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,9 +1,11 @@
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(){
fn main() {
let mut console = Console::new();
writeln!(console, "****************************************").unwrap();
@@ -14,9 +16,9 @@ fn main(){
// 2. Configure Type 4 tag
// [_.] Enable Tag emulation (currently the tag is always activated)
// loop {
// 1. Allow Receive Buffer
// 2. Subscribe to RECEIVE CALLBACK
// 3. Allow TX buffer
// 4. Subscribe to TX CALLBACK
// 1. Allow Receive Buffer
// 2. Subscribe to RECEIVE CALLBACK
// 3. Allow TX buffer
// 4. Subscribe to TX CALLBACK
// }
}

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;
}