use bitfield instead of strum
This commit is contained in:
+1
-1
@@ -199,7 +199,7 @@ impl<B: Interface, const N: usize> Pn532<B, N> {
|
||||
/// return error if current buffer contains an error code
|
||||
pub(crate) fn validate_buffer(&self, len: usize) -> Result<(), Error<B::TransportError>> {
|
||||
if len == 0 || (self.buffer[0] & 0x3F) != 0 {
|
||||
Err(Error::Status(StatusCode::from_repr(self.buffer[0] & 0x3F).unwrap()))
|
||||
Err(Error::Status(StatusCode::from_bits(self.buffer[0] & 0x3F)))
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user