Displaying 1 result from an estimated 1 matches for "pit_speaker_port".
2020 Jan 22
0
[PATCH] com32/modules: introduce play module
...ed loosely on similar GRUB2 code.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/io.h>
+#include <unistd.h>
+
+#define SPEAKER_PIT_FREQUENCY 0x1234dd
+#define BASE_TEMPO (60 * 1000)
+#define T_REST 0
+
+#define PIT_COUNTER_2 0x42
+#define PIT_CTRL 0x43
+#define PIT_SPEAKER_PORT 0x61
+
+#define PIT_SPK_TMR2 0x01
+#define PIT_SPK_DATA 0x02
+#define PIT_SPK_TMR2_LATCH 0x20
+#define PIT_CTRL_SELECT_2 0x80
+#define PIT_CTRL_READLOAD_WORD 0x30
+#define PIT_CTRL_SQUAREWAVE_GEN 0x06
+#define PIT_CTRL_COUNT_BINARY 0x00
+
+static void beep_off(void)
+{
+ unsigned char status;
+
+ s...