| 450 | } |
| 451 | |
| 452 | u32 SIEnablePolling(u32 poll) |
| 453 | { |
| 454 | BOOL enabled; |
| 455 | u32 en; |
| 456 | |
| 457 | if (poll == 0) |
| 458 | { |
| 459 | return Si.poll; |
| 460 | } |
| 461 | |
| 462 | enabled = OSDisableInterrupts(); |
| 463 | |
| 464 | poll >>= (31 - 7); |
| 465 | en = poll & 0xf0; |
| 466 | |
| 467 | poll &= (en >> 4) | 0x03fffff0; |
| 468 | |
| 469 | poll &= ~0x03ffff00; |
| 470 | |
| 471 | Si.poll &= ~(en >> 4); |
| 472 | |
| 473 | Si.poll |= poll; |
| 474 | |
| 475 | poll = Si.poll; |
| 476 | |
| 477 | SITransferCommands(); |
| 478 | |
| 479 | __SIRegs[12] = poll; |
| 480 | |
| 481 | OSRestoreInterrupts(enabled); |
| 482 | |
| 483 | return poll; |
| 484 | } |
| 485 | |
| 486 | u32 SIDisablePolling(u32 poll) |
| 487 | { |
no test coverage detected