diff options
| author | Miguel <m.i@gmx.at> | 2018-09-23 00:06:55 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-23 00:06:55 +0200 |
| commit | e73d89fd48a71a1cff764fc07edd46cb951e9418 (patch) | |
| tree | 9d71bc8387ac32cfce69df5d3c7d345dc9e59a40 /driver/keyboard.c | |
| parent | 80f7ccf5f82d8f04f853bde0bdee5b44a5403104 (diff) | |
struggling with e1000
Diffstat (limited to 'driver/keyboard.c')
| -rw-r--r-- | driver/keyboard.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 <stdbool.h> @@ -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); } |
