diff --git a/source/Cosmos.HAL2/PCSpeaker.cs b/source/Cosmos.HAL2/PCSpeaker.cs
index 99db2238d..9ebb6ef37 100644
--- a/source/Cosmos.HAL2/PCSpeaker.cs
+++ b/source/Cosmos.HAL2/PCSpeaker.cs
@@ -22,16 +22,27 @@ namespace Cosmos.HAL
protected static Core.IOGroup.PCSpeaker IO = BaseIOGroups.PCSpeaker;
private static PIT SpeakerPIT = new PIT();
+ ///
+ /// Enable sound.
+ ///
private static void EnableSound()
{
IO.Gate.Byte = (byte)(IO.Gate.Byte | 0x03);
}
+ ///
+ /// Disable sound.
+ ///
private static void DisableSound()
{
IO.Gate.Byte = (byte)(IO.Gate.Byte & ~3);
//IO.Port61.Byte = (byte)(IO.Port61.Byte | 0xFC);
}
+ ///
+ /// Play beep sound, at a specified frequency for a specified duration.
+ ///
+ /// Audio frequency in Hz, must be between 37 and 32767Hz.
+ /// Thrown if frequency is invalid.
public static void Beep(uint frequency)
{
if (frequency < 37 || frequency > 32767)
@@ -51,6 +62,14 @@ namespace Cosmos.HAL
}
EnableSound();
}
+
+ // TODO: continue exception list, once HAL is documented.
+ ///
+ /// Play beep sound, at a specified frequency for a specified duration.
+ ///
+ /// Audio frequency in Hz, must be between 37 and 32767Hz.
+ /// Beep duration, must be > 0.
+ /// Thrown if duration or frequency invalid.
public static void Beep(uint frequency, uint duration)
{
if (duration <= 0)