feat: ajout d'un buffer pour les scancodes
This commit is contained in:
parent
6d16c840ea
commit
1027401800
|
@ -96,8 +96,9 @@ static const u8 set1_ctrl[] =
|
||||||
|
|
||||||
u8 waitascii()
|
u8 waitascii()
|
||||||
{
|
{
|
||||||
|
u8 oldptrscan=ptrscan;
|
||||||
u8 oldptrascii=ptrascii;
|
u8 oldptrascii=ptrascii;
|
||||||
while(oldptrascii==ptrascii) {};
|
while((oldptrascii==ptrascii));/*(oldptrscan==ptrscan)&&*/
|
||||||
return bufferascii[ptrascii];
|
return bufferascii[ptrascii];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +144,6 @@ static void reboot(void)
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
unsigned convert(u32 keypressed)
|
unsigned convert(u32 keypressed)
|
||||||
{
|
{
|
||||||
|
|
||||||
u8 temp,key,lastscan;
|
u8 temp,key,lastscan;
|
||||||
/* garde le dernier pointeur du buffer scan */
|
/* garde le dernier pointeur du buffer scan */
|
||||||
lastscan=ptrscan;
|
lastscan=ptrscan;
|
||||||
|
@ -292,7 +292,7 @@ scancode=inb(0x60);
|
||||||
ascii = convert(scancode);
|
ascii = convert(scancode);
|
||||||
if(ascii != 0)
|
if(ascii != 0)
|
||||||
{
|
{
|
||||||
/*putchar(ascii);*/
|
putchar(ascii);
|
||||||
ptrascii++;
|
ptrascii++;
|
||||||
if (ptrascii==255) ptrascii==0;
|
if (ptrascii==255) ptrascii==0;
|
||||||
bufferascii[ptrascii]=ascii;
|
bufferascii[ptrascii]=ascii;
|
||||||
|
|
Loading…
Reference in New Issue