|
1 |
| -#[cfg(feature = "st25r3916")] |
2 |
| -pub mod cmds_st25r3916; |
3 |
| -#[cfg(feature = "st25r3916")] |
4 |
| -pub use cmds_st25r3916::Command; |
5 |
| - |
6 |
| -#[cfg(feature = "st25r3911b")] |
7 |
| -pub mod cmds_st25r3911b; |
8 |
| -#[cfg(feature = "st25r3911b")] |
9 |
| -pub use cmds_st25r3911b::Command; |
10 |
| - |
11 |
| -#[cfg(all(not(feature = "st25r3911b"), not(feature = "st25r3916")))] |
12 |
| -mod stub; |
13 |
| -#[cfg(all(not(feature = "st25r3911b"), not(feature = "st25r3916")))] |
14 |
| -pub use stub::Command; |
| 1 | +/// Direct commands |
| 2 | +#[derive(Debug, Clone, Copy, PartialEq, Eq)] |
| 3 | +#[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 4 | +#[allow(unused)] |
| 5 | +pub enum Command { |
| 6 | + /// Puts the chip in default state (same as after power-up) |
| 7 | + SetDefault = 0xC1, |
| 8 | + /// Stops all activities and clears FIFO same as C3 |
| 9 | + Stop = 0xC2, |
| 10 | + /// Stops all activities and clears FIFO same as C2 |
| 11 | + Clear = 0xC3, |
| 12 | + /// Transmit with CRC |
| 13 | + TransmitWithCrc = 0xC4, |
| 14 | + /// Transmit without CRC |
| 15 | + TransmitWithoutCrc = 0xC5, |
| 16 | + /// Transmit REQA |
| 17 | + TransmitReqa = 0xC6, |
| 18 | + /// Transmit WUPA |
| 19 | + TransmitWupa = 0xC7, |
| 20 | + /// NFC transmit with Initial RF Collision Avoidance |
| 21 | + InitialRfCollision = 0xC8, |
| 22 | + /// NFC transmit with Response RF Collision Avoidance |
| 23 | + ResponseRfCollisionN = 0xC9, |
| 24 | + #[cfg(feature = "st25r3911b")] |
| 25 | + /// NFC transmit with Response RF Collision Avoidance with n=0 |
| 26 | + ResponseRfCollisionNzero = 0xCA, |
| 27 | + #[cfg(feature = "st25r3911b")] |
| 28 | + /// Accepted in NFCIP-1 active communication bitrate detection mode |
| 29 | + GotoNormalNFCMode = 0xCB, |
| 30 | + #[cfg(feature = "st25r3911b")] |
| 31 | + /// Presets Rx and Tx configuration based on state of Mode definition register and Bit rate definition register |
| 32 | + PresetAnalog = 0xCC, |
| 33 | + #[cfg(feature = "st25r3916")] |
| 34 | + /// Passive target logic to Sense/Idle state |
| 35 | + GotoSense = 0xCD, |
| 36 | + #[cfg(feature = "st25r3916")] |
| 37 | + /// Passive target logic to Sleep/Halt state |
| 38 | + GotoSleep = 0xCE, |
| 39 | + /// Mask receive data |
| 40 | + MaskReceiveData = 0xD0, |
| 41 | + /// Unmask receive data |
| 42 | + UnmaskReceiveData = 0xD1, |
| 43 | + #[cfg(feature = "st25r3916")] |
| 44 | + /// AM Modulation state change |
| 45 | + AmModStateChange = 0xD2, |
| 46 | + /// Measure singal amplitude on RFI inputs |
| 47 | + MeasureAmplitude = 0xD3, |
| 48 | + #[cfg(feature = "st25r3911b")] |
| 49 | + /// Performs gain reduction based on the current noise level |
| 50 | + Squelch = 0xD4, |
| 51 | + /// Reset RX Gain |
| 52 | + ResetRxgain = 0xD5, |
| 53 | + /// Adjust regulators |
| 54 | + AdjustRegulators = 0xD6, |
| 55 | + #[cfg(feature = "st25r3911b")] |
| 56 | + /// Starts sequence that activates the Tx, measures the modulation depth, and adapts it to comply with the specified modulation depth |
| 57 | + CalibrateModDepth = 0xD7, |
| 58 | + /// Starts the sequence to adjust the driver timing. Called CalibrateAntenna in st25r3911b |
| 59 | + CalibrateDriverTiming = 0xD8, |
| 60 | + /// Measure phase between RFO and RFI signal |
| 61 | + MeasurePhase = 0xD9, |
| 62 | + /// Clear RSSI bits and restart the measurement |
| 63 | + ClearRssi = 0xDA, |
| 64 | + #[cfg(feature = "st25r3916")] |
| 65 | + /// Clears FIFO, Collision and IRQ status |
| 66 | + ClearFifo = 0xDB, |
| 67 | + /// Transparent mode - amplitude of signal present on RFI inputs is measured, result is stored in A/D converter output register |
| 68 | + TransparentMode = 0xDC, |
| 69 | + /// Calibrate the capacitive sensor |
| 70 | + CalibrateCSensor = 0xDD, |
| 71 | + /// Measure capacitance sensor |
| 72 | + MeasureCapacitance = 0xDE, |
| 73 | + /// Measure power supply voltage |
| 74 | + MeasureVdd = 0xDF, |
| 75 | + /// Start the general purpose timer |
| 76 | + StartGpTimer = 0xE0, |
| 77 | + /// Start the wake-up timer |
| 78 | + StartWupTimer = 0xE1, |
| 79 | + /// Start the mask-receive timer |
| 80 | + StartMaskReceiveTimer = 0xE2, |
| 81 | + /// Start the no-response timer |
| 82 | + StartNoResponseTimer = 0xE3, |
| 83 | + #[cfg(feature = "st25r3916")] |
| 84 | + /// Start PPon2 timer |
| 85 | + StartPpon2Timer = 0xE4, |
| 86 | + #[cfg(feature = "st25r3916")] |
| 87 | + /// Stop No Response Timer |
| 88 | + StopNrt = 0xE8, |
| 89 | + #[cfg(feature = "st25r3916")] |
| 90 | + /// Enable R/W access to the test registers |
| 91 | + SpaceBAccess = 0xFB, |
| 92 | + /// Enable R/W access to the test registers |
| 93 | + TestAccess = 0xFC, |
| 94 | +} |
0 commit comments