OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Apr 27, 2024 12:25 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Keyboard driver doesnt work
PostPosted: Wed Sep 13, 2023 10:58 pm 
Offline

Joined: Wed Sep 13, 2023 10:52 pm
Posts: 1
hello i have troubles with keyboard driver
the problem is keyboard driver print character only on first miliseconds of boot if i continue type after bios keyboard doesnt work
keyb.c
Code:
void getc() {
int i, scancode;
scancode = inw(0x60);
for (i = 1000; i < 0; i++) {
    return scancode;
}
}

init.c keyb code
Code:
    while ( 1 == 1 ) {
       
        if (scan & 0x80) {
           
        }
        else {
        kprintf(scan, k++, 0x17);   
        }
       
    }

if i type with if (scan & 0x80) it doesnt work
but without it prints but only on first second of boot when i type after one second it doesnt print


Top
 Profile  
 
 Post subject: Re: Keyboard driver doesnt work
PostPosted: Sun Oct 15, 2023 2:14 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
Don't ignore compiler warnings.

Scan codes aren't ASCII, are you converting them somewhere before you print them?

Are you using interrupts or polling?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group