57 void Init(
int nPort,
int nSlot,
int nDeadZone);
94 unsigned char *pAxis0,
95 unsigned char *pAxis1,
96 unsigned char *pAxis2,
97 unsigned char *pAxis3,
98 unsigned char *pPressures,
99 short *pPressureDeltas);
110 bool WaitForRequest();
117 void AdvancePhase(
int nState);
122 int mHeldButtonsSeen;
126 int mPreviousButtons;
134 unsigned short mRawButtons;
One controller's pad-library state: the DMA area libpad fills and the decoder's working state.
Definition breugpad.h:13
static constexpr int kActuatorByteCount
Bytes of the actuator buffers scePadSetActDirect() and scePadSetActAlign() receive.
Definition breugpad.h:16
void Init(int nPort, int nSlot, int nDeadZone)
Reset the record and open the pad at nPort and nSlot.
static short ApplyDeadzone(short nAxis, int nDeadZone)
Rescale an analog axis centred on zero to remove the dead zone.
void SetActuators(int nSmallMotor, unsigned char nBigMotor)
Drive the two vibration motors.
static constexpr int kLastAxisCount
Entries of mLastAxes.
Definition breugpad.h:25
int Read(int *pButtons, unsigned char *pAxis0, unsigned char *pAxis1, unsigned char *pAxis2, unsigned char *pAxis3, unsigned char *pPressures, short *pPressureDeltas)
Advance the pad's setup state machine and decode the latest report.
static constexpr int kPressureByteCount
Bytes of the pressure baseline Read() subtracts from each pressure reading.
Definition breugpad.h:19
static constexpr int kAxisDeltaCount
Entries of mAxisDeltas.
Definition breugpad.h:28
static constexpr int kDmaFrameCount
Frames of the DMA area scePadPortOpen() receives.
Definition breugpad.h:22
scePadDmaFrame mDmaArea[kDmaFrameCount]
The area libpad writes reports into.
Definition breugpad.h:102