From e73d89fd48a71a1cff764fc07edd46cb951e9418 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 23 Sep 2018 00:06:55 +0200 Subject: struggling with e1000 --- driver/keyboard.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'driver/keyboard.c') diff --git a/driver/keyboard.c b/driver/keyboard.c index ac2028c..2352532 100644 --- a/driver/keyboard.c +++ b/driver/keyboard.c @@ -2,6 +2,7 @@ #include "keyboard.h" #include "syscalls.h" #include "log.h" +#include "e1000.h" #include @@ -15,7 +16,13 @@ static char num_syms[]={')','!','@','#','$','%','^','&','*','('}; static void put(uint8_t c) { - //syscall_write(kb_stream,(char *)&c,1); + uint16_t dat[]={ + 0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x52,0x5,0x50a,0x00,0x02,0x02,0x08,0x06,0x00, + 0x01,0x08,0x00,0x06,0x04,0x00,0x01,0x52,0x5,0x50a,0x00,0x02,0x02,0x0a,0x00,0x02}; + + if(c=='y')e1000_sendPacket(dat,32); + if(c=='x')e1000_init(0); + if(c=='i')e1000_irq(11); syscall_generic(SYSCALL_WRITE,kb_stream, (char *)&c , 1, 0); } -- cgit v1.2.3