File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 1616//!
1717//! ## Quick start (PCD)
1818//!
19- //! ```rust,no_run
20- //! # struct T; impl iso14443::type_a::PcdTransceiver for T {
21- //! # type Error = ();
22- //! # fn transceive(&mut self, _: &iso14443::type_a::Frame) -> Result<Vec<u8>, ()> { todo!() }
23- //! # fn try_enable_hw_crc(&mut self) -> Result<(), ()> { todo!() }
24- //! # }
25- //! # fn example(t: &mut T) -> Result<(), Box<dyn std::error::Error>> {
19+ //! ```rust,ignore
2620//! use iso14443::type_a::{activation::activate, pcd::Pcd, Cid, Fsdi};
2721//!
28- //! let activation = activate(t).map_err(|e| format!("{e:?}"))?;
22+ //! let activation = activate(&mut t).map_err(|e| format!("{e:?}"))?;
2923//! if activation.sak.iso14443_4_compliant {
3024//! let cid = Cid::new(0).unwrap();
31- //! let (mut pcd, _ats) = Pcd::connect(t, Fsdi::Fsd256, cid)
25+ //! let (mut pcd, _ats) = Pcd::connect(&mut t, Fsdi::Fsd256, cid)
3226//! .map_err(|e| format!("{e:?}"))?;
3327//! let resp = pcd.exchange(&[0x00, 0xA4, 0x04, 0x00])
3428//! .map_err(|e| format!("{e:?}"))?;
3529//! pcd.deselect().map_err(|e| format!("{e:?}"))?;
3630//! }
37- //! # Ok(())
38- //! # }
3931//! ```
4032//!
4133//! ## Features
You can’t perform that action at this time.
0 commit comments