X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=src%2Fkeyb.h;h=d031aee93eeb0886c7957864bd7d7281fe40c55d;hp=6b8f24cc1add4236b2d7272f6a5215f0c7177b5c;hb=81c11bdd80190ec319a82b0402173cfb65fcbf72;hpb=a2f94f569a4c99204de02814a20098a71527e913 diff --git a/src/keyb.h b/src/keyb.h index 6b8f24c..d031aee 100644 --- a/src/keyb.h +++ b/src/keyb.h @@ -1,3 +1,20 @@ +/* +pcboot - bootable PC demo/game kernel +Copyright (C) 2018 John Tsiombikas + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY, without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ #ifndef KEYB_H_ #define KEYB_H_ @@ -26,6 +43,15 @@ enum { void kb_init(void); +void kb_intr_enable(void); +void kb_intr_disable(void); + +int kb_setmode(int mode); +int kb_getmode(void); + +void kb_set_translate(int xlat); +int kb_get_translate(void); + /* Boolean predicate for testing the current state of a particular key. * You may also pass KB_ANY to test if any key is held down. */ @@ -39,4 +65,14 @@ int kb_getkey(void); void kb_putback(int key); +/* returns 1 if the keyboard controller is ready to read/write + * returns 0 if the wait times out + */ +int kb_wait_write(void); +int kb_wait_read(void); + +void kb_send_cmd(unsigned char cmd); +void kb_send_data(unsigned char data); +unsigned char kb_read_data(void); + #endif /* KEYB_H_ */