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]

[src]

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

[src]

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.

[src]

Sends commands to the underlying hardware and provides responses

[src]

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

[src]

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

[src]

Control the vibration motors in the DualShock 1 or 2 controller.

  • little - Turn on the little motor (no strength supported)
  • big - Strength of the big right motor

[src]

Control the JogCon's jogwheel.

  • strength - A value between 0 and 15. Any higher will wrap around.

[src]

Read various parameters from the controller including its current status.

[src]

Ask the controller for input states. Different contoller types can be returned.

Trait Implementations

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