From f371221dba61969857f55eadc106372f3261e676 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 2 Jul 2021 23:57:11 -0400 Subject: [PATCH] Add a quick test of tone generator 1. --- .../Mac/Clock SignalTests/EnterpriseDaveTests.mm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock SignalTests/EnterpriseDaveTests.mm b/OSBindings/Mac/Clock SignalTests/EnterpriseDaveTests.mm index 75fa28eb7..5d491c48e 100644 --- a/OSBindings/Mac/Clock SignalTests/EnterpriseDaveTests.mm +++ b/OSBindings/Mac/Clock SignalTests/EnterpriseDaveTests.mm @@ -82,9 +82,19 @@ // apply sync momentarily. _interruptSource->write(7, 2 << 5); _interruptSource->write(0, 137); - _interruptSource->write(2, 0); + _interruptSource->write(1, 0); [self performTestExpectedToggles:250000/138 expectedInterrupts:250000/(138*2)]; } +- (void)testTone1Timer { + // Set tone generator 1 as the interrupt source, with a divider of 961; + // apply sync momentarily. + _interruptSource->write(7, 3 << 5); + _interruptSource->write(2, 961 & 0xff); + _interruptSource->write(3, (961 >> 8) & 0xff); + + [self performTestExpectedToggles:250000/961 expectedInterrupts:250000/(961*2)]; +} + @end