Enum pn532::requests::Command

source ·
#[repr(u8)]
pub enum Command {
Show 32 variants Diagnose = 0, GetFirmwareVersion = 2, GetGeneralStatus = 4, ReadRegister = 6, WriteRegister = 8, ReadGPIO = 12, WriteGPIO = 14, SetSerialBaudRate = 16, SetParameters = 18, SAMConfiguration = 20, PowerDown = 22, RFConfiguration = 50, RFRegulationTest = 88, InJumpForDEP = 86, InJumpForPSL = 70, InListPassiveTarget = 74, InATR = 80, InPSL = 78, InDataExchange = 64, InCommunicateThru = 66, InDeselect = 68, InRelease = 82, InSelect = 84, InAutoPoll = 96, TgInitAsTarget = 140, TgSetGeneralBytes = 146, TgGetData = 134, TgSetData = 142, TgSetMetaData = 148, TgGetInitiatorCommand = 136, TgResponseToInitiator = 144, TgGetTargetStatus = 138,
}
Expand description

Commands supported by the Pn532

These commands are fully described in the section 7 of the User Manual: https://www.nxp.com/docs/en/user-guide/141520.pdf

Variants§

§

Diagnose = 0

This command is used for self-diagnosis. Processing time of this command varies depending on the content of the processing.

For more information, see 7.2.1 Diagnose

§

GetFirmwareVersion = 2

This command is used to get the version of the embedded firmware from PN532.

For more information, see 7.2.2 GetFirmwareVersion

§

GetGeneralStatus = 4

This command allows the host controller to know at a given moment the complete situation of the PN532.

For more information, see 7.2.3 GetGeneralStatus

§

ReadRegister = 6

This command is used to read the content of one or several internal registers of the PN532.

For more information, see 7.2.4 ReadRegister

§

WriteRegister = 8

This command is used to overwrite the content of one or several internal registers of the PN532.

For more information, see 7.2.5 WriteRegister

§

ReadGPIO = 12

Tells the PN532 to read the value for each GPIO port and return the information to the host controller.

For more information, see 7.2.6 ReadGPIO

§

WriteGPIO = 14

Tells the PN532 to apply the value for each port specified by the host controller.

For more information, see 7.2.7 WriteGPIO

§

SetSerialBaudRate = 16

Selects the baud rate on the serial link between the host controller and the PN532.

For more information, see 7.2.8 SetSerialBaudRate

§

SetParameters = 18

This command is used to set internal parameters of the PN532, and then to configure its behavior regarding different cases.

For more information, see 7.2.9 SetParameters

§

SAMConfiguration = 20

This command is used to select the data flow path by configuring the internal serial data switch.

For more information, see 7.2.10 SAMConfiguration

§

PowerDown = 22

This command can be used to put the PN532 into Power Down mode in order to save power consumption.

For more information, see 7.2.11 PowerDown

§

RFConfiguration = 50

This command is used to configure the different settings of the PN532.

For more information, see 7.3.1 RFConfiguration

§

RFRegulationTest = 88

This command is used for radio regulation test.

For more information, see 7.3.2 RFRegulationTest

§

InJumpForDEP = 86

This command is used by a host controller to activate a target using either active or passive communication mode during communication over DEP protocol.

For more information, see 7.3.3 InJumpForDEP

§

InJumpForPSL = 70

This command is used by a host controller to activate a target using either active or passive communication mode during communication over PSL or DEP protocols.

For more information, see 7.3.4 InJumpForPSL

§

InListPassiveTarget = 74

This command tells PN532 to detect as many targets as possible in passive mode.

For more information, see 7.3.5 InListPassiveTarget

§

InATR = 80

This command is used by a host controller to launch an activation of a target in case of passive mode.

For more information, see 7.3.6 InATR

§

InPSL = 78

This command is used by a host controller to change the defined bit rates either with a TPE target or with a ISO/IEC14443-4 target.

For more information, see 7.3.7 InPSL

§

InDataExchange = 64

This command is used to support protocol data exchanges between the PN532 as initiator and a target.

For more information, see 7.3.8 InDataExchange

§

InCommunicateThru = 66

This command is used to support basic data exchanges between the PN532 and a target.

For more information, see 7.3.9 InCommunicateThru

§

InDeselect = 68

Command to deselect specified targets(s).

For more information, see 7.3.10 InDeselect

§

InRelease = 82

Command to release the specified target(s).

For more information, see 7.3.11 InRelease

§

InSelect = 84

Command to select the specified target.

For more information, see 7.3.12 InSelect

§

InAutoPoll = 96

This command is used to poll card(s) / target(s) of specified Type present in the RF field.

For more information, see 7.3.13 InAutoPoll

§

TgInitAsTarget = 140

The host controller uses this command to configure the PN532 as target.

For more information, see 7.3.14 TgInitAsTarget

§

TgSetGeneralBytes = 146

This command is used to give General Bytes to the PN532.

For more information, see 7.3.15 TgSetGeneralBytes

§

TgGetData = 134

This command allows the host controller to get back the data received by the PN532 from its initiator.

For more information, see 7.3.16 TgGetData

§

TgSetData = 142

This command allows the host controller to spully PN532 with teh data that it wants to send back to teh initiator.

For more information, see 7.3.17 TgSetData

§

TgSetMetaData = 148

This command is used if the overall amount of data to be sent cannot be transmitted in one frame.

For more information, see 7.3.18 TgSetMetaData

§

TgGetInitiatorCommand = 136

This command is used to get a packet of data from an initiator and to send it back to the host controller.

For more information, see 7.3.19 TgGetInitiatorCommand

§

TgResponseToInitiator = 144

This command is used to send a response packet of data to an initiator.

For more information, see 7.3.20 TgResponseToInitiator

§

TgGetTargetStatus = 138

This command is used by the host controller to know what the current state of the PN532 is.

For more information, see 7.3.21 TgGetTargetStatus

Trait Implementations§

source§

impl Clone for Command

source§

fn clone(&self) -> Command

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Command

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Command

source§

fn eq(&self, other: &Command) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Command

source§

impl Eq for Command

source§

impl StructuralPartialEq for Command

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.