X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fkeyb.h;h=a5297e4ad3c7baf3361d0e236f726d27c4d1ff1f;hb=3cb6f9dad7e37db865bd3cbccf0b5d6471fdd73f;hp=6b8f24cc1add4236b2d7272f6a5215f0c7177b5c;hpb=a2f94f569a4c99204de02814a20098a71527e913;p=bootcensus diff --git a/src/keyb.h b/src/keyb.h index 6b8f24c..a5297e4 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_ @@ -39,4 +56,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_ */