projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add PC speaker driver and connect it to '\a' in the VGA console.
[pintos-anon]
/
src
/
devices
/
vga.c
diff --git
a/src/devices/vga.c
b/src/devices/vga.c
index 8255747244e641d599d686fadecb167a9fc6b4f7..f421b617bd3706858d2536eb21866531b1fd9b85 100644
(file)
--- a/
src/devices/vga.c
+++ b/
src/devices/vga.c
@@
-3,6
+3,7
@@
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
+#include "devices/speaker.h"
#include "threads/io.h"
#include "threads/interrupt.h"
#include "threads/vaddr.h"
#include "threads/io.h"
#include "threads/interrupt.h"
#include "threads/vaddr.h"
@@
-80,6
+81,12
@@
vga_putc (int c)
if (cx >= COL_CNT)
newline ();
break;
if (cx >= COL_CNT)
newline ();
break;
+
+ case '\a':
+ intr_set_level (old_level);
+ speaker_beep ();
+ intr_disable ();
+ break;
default:
fb[cy][cx][0] = c;
default:
fb[cy][cx][0] = c;