mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 09:01:24 +03:00
[usb] Add basic support for USB keyboards
When USB network card drivers are used, the BIOS' legacy USB capability is necessarily disabled since there is no way to share the host controller between the BIOS and iPXE. This currently results in USB keyboards becoming non-functional in USB-enabled builds of iPXE. Fix by adding basic support for USB keyboards, enabled by default in iPXE builds which include USB support. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -82,6 +82,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#define ERRFILE_ehci ( ERRFILE_DRIVER | 0x000a0000 )
|
||||
#define ERRFILE_uhci ( ERRFILE_DRIVER | 0x000b0000 )
|
||||
#define ERRFILE_usbhid ( ERRFILE_DRIVER | 0x000c0000 )
|
||||
#define ERRFILE_usbkbd ( ERRFILE_DRIVER | 0x000d0000 )
|
||||
|
||||
#define ERRFILE_nvs ( ERRFILE_DRIVER | 0x00100000 )
|
||||
#define ERRFILE_spi ( ERRFILE_DRIVER | 0x00110000 )
|
||||
|
||||
@@ -58,6 +58,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
*/
|
||||
|
||||
#define KEY_ANSI( n, terminator ) ( 0x100 * ( (n) + 1 ) + (terminator) )
|
||||
#define KEY_ANSI_N( key ) ( ( (key) / 0x100 ) - 1 )
|
||||
#define KEY_ANSI_TERMINATOR( key ) ( (key) & 0xff )
|
||||
|
||||
#define KEY_MIN 0x101
|
||||
#define KEY_UP KEY_ANSI ( 0, 'A' ) /**< Up arrow */
|
||||
|
||||
Reference in New Issue
Block a user