Add NFC example application

This commit is contained in:
Mirna
2020-10-12 11:07:57 +02:00
parent 245e0ab781
commit d36cac1a33
2 changed files with 27 additions and 0 deletions

View File

@@ -921,6 +921,13 @@ if __name__ == "__main__":
const="console_test",
help=("Compiles and installs the console_test example that tests the "
"console driver with messages of various lengths."))
apps_group.add_argument(
"--nfct_test",
dest="application",
action="store_const",
const="console_test",
help=("Compiles and installs the console_test example that tests the "
"console driver with messages of various lengths."))
main_parser.set_defaults(features=["with_ctap1"])

20
examples/nfct_test.rs Normal file
View File

@@ -0,0 +1,20 @@
extern crate lang_items;
use libtock_drivers::console::Console;
use libtock_drivers::nfc;
fn main(){
writeln!(console, "****************************************").unwrap();
writeln!(console, "nfct_test application is installed").unwrap();
writeln!(console, "****************************************").unwrap();
// 1. Subscribe to a SELECTED CALLBACK
// 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
// }
}