Fixes for some unsuccessful checks
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
|
extern crate alloc;
|
||||||
extern crate lang_items;
|
extern crate lang_items;
|
||||||
|
|
||||||
|
use core::fmt::Write;
|
||||||
use libtock_drivers::console::Console;
|
use libtock_drivers::console::Console;
|
||||||
use libtock_drivers::nfc;
|
// use libtock_drivers::nfc;
|
||||||
|
|
||||||
fn main(){
|
fn main() {
|
||||||
let mut console = Console::new();
|
let mut console = Console::new();
|
||||||
|
|
||||||
writeln!(console, "****************************************").unwrap();
|
writeln!(console, "****************************************").unwrap();
|
||||||
@@ -14,9 +16,9 @@ fn main(){
|
|||||||
// 2. Configure Type 4 tag
|
// 2. Configure Type 4 tag
|
||||||
// [_.] Enable Tag emulation (currently the tag is always activated)
|
// [_.] Enable Tag emulation (currently the tag is always activated)
|
||||||
// loop {
|
// loop {
|
||||||
// 1. Allow Receive Buffer
|
// 1. Allow Receive Buffer
|
||||||
// 2. Subscribe to RECEIVE CALLBACK
|
// 2. Subscribe to RECEIVE CALLBACK
|
||||||
// 3. Allow TX buffer
|
// 3. Allow TX buffer
|
||||||
// 4. Subscribe to TX CALLBACK
|
// 4. Subscribe to TX CALLBACK
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
2
third_party/libtock-drivers/src/lib.rs
vendored
2
third_party/libtock-drivers/src/lib.rs
vendored
@@ -3,9 +3,9 @@
|
|||||||
pub mod buttons;
|
pub mod buttons;
|
||||||
pub mod console;
|
pub mod console;
|
||||||
pub mod led;
|
pub mod led;
|
||||||
|
pub mod nfc;
|
||||||
pub mod result;
|
pub mod result;
|
||||||
pub mod rng;
|
pub mod rng;
|
||||||
pub mod timer;
|
pub mod timer;
|
||||||
pub mod usb_ctap_hid;
|
pub mod usb_ctap_hid;
|
||||||
pub mod util;
|
pub mod util;
|
||||||
pub mod nfc;
|
|
||||||
|
|||||||
14
third_party/libtock-drivers/src/nfc.rs
vendored
14
third_party/libtock-drivers/src/nfc.rs
vendored
@@ -31,12 +31,7 @@ pub fn disable_emulation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn emulate(enabled: bool) -> bool {
|
pub fn emulate(enabled: bool) -> bool {
|
||||||
let result_code = syscalls::command(
|
let result_code = syscalls::command(DRIVER_NUMBER, command_nr::EMULATE, enabled as usize, 0);
|
||||||
DRIVER_NUMBER,
|
|
||||||
command_nr::EMULATE,
|
|
||||||
enabled as usize,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
if result_code.is_err() {
|
if result_code.is_err() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -61,12 +56,7 @@ pub fn selected() -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn configure(tag_type: u8) -> bool {
|
pub fn configure(tag_type: u8) -> bool {
|
||||||
let result_code = syscalls::command(
|
let result_code = syscalls::command(DRIVER_NUMBER, command_nr::CONFIGURE, tag_type as usize, 0);
|
||||||
DRIVER_NUMBER,
|
|
||||||
command_nr::CONFIGURE,
|
|
||||||
tag_type as usize,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
if result_code.is_err() {
|
if result_code.is_err() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user