| 325 | } |
| 326 | |
| 327 | BOOL PADRecalibrate(u32 mask) |
| 328 | { |
| 329 | BOOL enabled; |
| 330 | u32 disableBits; |
| 331 | |
| 332 | enabled = OSDisableInterrupts(); |
| 333 | |
| 334 | mask |= PendingBits; |
| 335 | PendingBits = 0; |
| 336 | mask &= ~(WaitingBits | CheckingBits); |
| 337 | ResettingBits |= mask; |
| 338 | disableBits = ResettingBits & EnabledBits; |
| 339 | EnabledBits &= ~mask; |
| 340 | |
| 341 | if (!(UnkVal & 0x40)) |
| 342 | { |
| 343 | RecalibrateBits |= mask; |
| 344 | } |
| 345 | |
| 346 | SIDisablePolling(disableBits); |
| 347 | if (ResettingChan == 32) |
| 348 | { |
| 349 | DoReset(); |
| 350 | } |
| 351 | OSRestoreInterrupts(enabled); |
| 352 | return TRUE; |
| 353 | } |
| 354 | |
| 355 | BOOL PADInit() |
| 356 | { |
no test coverage detected