Add serial init and serial interrupts
This commit is contained in:
parent
722d738254
commit
543ef3d96f
9 changed files with 155 additions and 53 deletions
|
@ -1,6 +1,7 @@
|
|||
use x86::io;
|
||||
|
||||
use device::ps2::PS2;
|
||||
use device::serial::{COM1, COM2};
|
||||
|
||||
#[inline(always)]
|
||||
unsafe fn master_ack() {
|
||||
|
@ -33,12 +34,12 @@ interrupt!(cascade, {
|
|||
});
|
||||
|
||||
interrupt!(com2, {
|
||||
print!("COM2\n");
|
||||
COM2.lock().on_receive();
|
||||
master_ack();
|
||||
});
|
||||
|
||||
interrupt!(com1, {
|
||||
print!("COM1\n");
|
||||
COM1.lock().on_receive();
|
||||
master_ack();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue