Enum pn532::ErrorCode [−][src]
#[repr(u8)]
pub enum ErrorCode {
Show 26 variants
Timeout,
CrcError,
ParityError,
WrongBitCountDuringAntiCollision,
FramingError,
AbnormalBitCollision,
InsufficientCommunicationBuffer,
RfBufferOverflow,
RfFieldHasNotBeenSwitchedOn,
RfProtocolError,
Overheating,
InternalBufferOverflow,
InvalidParameter,
CommandNotSupported,
WrongDataFormat,
AuthenticationError,
WrongUidCheckByte,
InvalidDeviceState,
OperationNotAllowed,
CommandNotAcceptable,
TargetHasBeenReleased,
CardHasBeenExchanged,
CardHasDisappeared,
Nfcid3InitiatorTargetMismatch,
OverCurrent,
NadMsssing,
}
Expand description
Some commands return a status byte.
If this byte is not zero it will contain an ErrorCode
.
fn print_error(status_byte: u8){
if let Ok(error_code) = ErrorCode::try_from(status_byte){
println!("{:?}", error_code);
} else {
println!("unknown error code");
}
}
Variants
Timeout
Time Out, the target has not answered
CrcError
A CRC error has been detected by the CIU
ParityError
A Parity error has been detected by the CIU
WrongBitCountDuringAntiCollision
During an anti-collision/select operation (ISO/IEC14443-3 Type A and ISO/IEC18092 106 kbps passive mode), an erroneous Bit Count has been detected
FramingError
Framing error during Mifare operation
AbnormalBitCollision
An abnormal bit-collision has been detected during bit wise anti-collision at 106 kbps
InsufficientCommunicationBuffer
Communication buffer size insufficient
RfBufferOverflow
RF Buffer overflow has been detected by the CIU (bit BufferOvfl of the register CIU_Error)
RfFieldHasNotBeenSwitchedOn
In active communication mode, the RF field has not been switched on in time by the counterpart (as defined in NFCIP-1 standard)
RfProtocolError
RF Protocol error (cf. Error! Reference source not found., description of the CIU_Error register)
Overheating
Temperature error: the internal temperature sensor has detected overheating, and therefore has automatically switched off the antenna drivers
InternalBufferOverflow
Internal buffer overflow
InvalidParameter
Invalid parameter (range, format, …)
CommandNotSupported
DEP Protocol: The PN532 configured in target mode does not support the command received from the initiator (the command received is not one of the following: ATR_REQ, WUP_REQ, PSL_REQ, DEP_REQ, DSL_REQ, RLS_REQ Error! Reference source not found.).
WrongDataFormat
DEP Protocol, Mifare or ISO/IEC14443-4: The data format does not match to the specification. Depending on the RF protocol used, it can be: • Bad length of RF received frame, • Incorrect value of PCB or PFB, • Invalid or unexpected RF received frame, • NAD or DID incoherence.
AuthenticationError
Mifare: Authentication error
WrongUidCheckByte
ISO/IEC14443-3: UID Check byte is wrong
InvalidDeviceState
DEP Protocol: Invalid device state, the system is in a state which does not allow the operation
OperationNotAllowed
Operation not allowed in this configuration (host controller interface)
CommandNotAcceptable
This command is not acceptable due to the current context of the PN532 (Initiator vs. Target, unknown target number, Target not in the good state, …)
TargetHasBeenReleased
The PN532 configured as target has been released by its initiator
CardHasBeenExchanged
PN532 and ISO/IEC14443-3B only: the ID of the card does not match, meaning that the expected card has been exchanged with another one.
CardHasDisappeared
PN532 and ISO/IEC14443-3B only: the card previously activated has disappeared.
Nfcid3InitiatorTargetMismatch
Mismatch between the NFCID3 initiator and the NFCID3 target in DEP 212/424 kbps passive.
OverCurrent
An over-current event has been detected
NadMsssing
NAD missing in DEP frame
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
Mutably borrows from an owned value. Read more