Struct pscontroller_rs::PlayStationPort[][src]

pub struct PlayStationPort<SPI, CS> { /* fields omitted */ }

The main event! Create a port using an SPI bus and start commanding controllers!

Methods

impl<E, SPI, CS> PlayStationPort<SPI, CS> where
    SPI: Transfer<u8, Error = E>,
    CS: OutputPin
[src]

Create a new device to talk over the PlayStation's controller port

Set the active port on the multi-tap. If no tap is being used, anything other than A will fail to return anything. Or so I assume! Setting this will mean any commands send will be directed towards that port indefinitely.

Sends commands to the underlying hardware and provides responses

Configure the controller to set it to DualShock2 mode. This will also enable analog mode on DualShock1 controllers.

Configure the JogCon for wheel control.

If no digital buttons are pressed in this mode for 60 seconds, the JogCon will go to sleep until buttons are pressed. If no polling is done for 10 seconds, it will drop out of this mode and revert to the standard Controller mode

Read various parameters from the controller including its current status.

Get the raw data from polling for a controller. You can use this to cooerce the data into some controller that can't be safely identified by read_input, but you should rely on that function if you can.

Ask the controller for input states. Different contoller types will be returned automatically for you. If you'd like to cooerce a controller yourself, use read_raw.

Auto Trait Implementations

impl<SPI, CS> Send for PlayStationPort<SPI, CS> where
    CS: Send,
    SPI: Send

impl<SPI, CS> Sync for PlayStationPort<SPI, CS> where
    CS: Sync,
    SPI: Sync