Add NFC example application
This commit is contained in:
@@ -921,6 +921,13 @@ if __name__ == "__main__":
|
|||||||
const="console_test",
|
const="console_test",
|
||||||
help=("Compiles and installs the console_test example that tests the "
|
help=("Compiles and installs the console_test example that tests the "
|
||||||
"console driver with messages of various lengths."))
|
"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"])
|
main_parser.set_defaults(features=["with_ctap1"])
|
||||||
|
|
||||||
|
|||||||
20
examples/nfct_test.rs
Normal file
20
examples/nfct_test.rs
Normal 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
|
||||||
|
// }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user