<aname="l1"></a><spanclass=cF0>The </span><spanclass=cF2>Programmable Interval Timer</span><spanclass=cF0> has two purposes: Generate interrupts, and control the </span><spanclass=cF2>PC speaker</span><spanclass=cF0>.
<aname="l5"></a></span><ahref="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l685"><spanclass=cF4>Channel 0</span></a><spanclass=cF0> can generate an interrupt, IRQ 0, at a defined frequency. We set it up in </span><ahref="https://tomawezome.github.io/ZealOS/Kernel/KMain.html#l124"><spanclass=cF4>TimerInit</span></a><spanclass=cF0>(), and use it in </span><ahref="https://tomawezome.github.io/ZealOS/Kernel/KMisc.html#l22"><spanclass=cF4>SysTimerRead</span></a><spanclass=cF0>().
<aname="l10"></a></span><ahref="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l686"><spanclass=cF4>Channel 2</span></a><spanclass=cF0>'s output is connected to the PC speaker.
<aname="l12"></a>The Command port is used to control each of these 3 channels. The relevant </span><ahref="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l689"><spanclass=cF4>flags</span></a><spanclass=cF0> are defined.
<aname="l14"></a>See </span><ahref="https://tomawezome.github.io/ZealOS/Kernel/KMisc.html#l129"><spanclass=cF4>Sound</span></a><spanclass=cF0>() for how the PC speaker frequency is changed.</span></pre></body>