| 727 | } |
| 728 | |
| 729 | static BOOL OnReset(BOOL f) |
| 730 | { |
| 731 | static BOOL recalibrated = FALSE; |
| 732 | BOOL sync; |
| 733 | |
| 734 | if (SamplingCallback) |
| 735 | { |
| 736 | PADSetSamplingCallback(NULL); |
| 737 | } |
| 738 | |
| 739 | if (!f) |
| 740 | { |
| 741 | sync = PADSync(); |
| 742 | if (!recalibrated && sync) |
| 743 | { |
| 744 | recalibrated = |
| 745 | PADRecalibrate(PAD_CHAN0_BIT | PAD_CHAN1_BIT | PAD_CHAN2_BIT | PAD_CHAN3_BIT); |
| 746 | return FALSE; |
| 747 | } |
| 748 | return sync; |
| 749 | } |
| 750 | else |
| 751 | { |
| 752 | recalibrated = FALSE; |
| 753 | } |
| 754 | |
| 755 | return TRUE; |
| 756 | } |
| 757 | |
| 758 | static void SamplingHandler(__OSInterrupt interrupt, OSContext* context) |
| 759 | { |
nothing calls this directly
no test coverage detected