83Plus:Software:usb8x/Asm Interface/KBD/KBDInit

From WikiTI
Revision as of 10:19, 27 August 2006 by Dan Englender (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Name: KBDInit

Minimum usb8x version: 0.11

Initialize the keyboard driver and hardware

Inputs

  • HL: Address of buffer for keyboard driver's RAM storage
  • DE: Address of temporary buffer for descriptors
  • B: Flags
    • bit 0: reset = auto handle lock keys, reset = pass back locks as regular keys
    • bit 1: Initial state of CAPS LOCK key
    • bit 2: Initial state of NUM LOCK key
    • bit 3: Initial state of SCROLL LOCK key

Outputs

  • NC: Success

Destroys

  • AF, BC, DE, HL, IX

Notes

Initializes the USB host but assumes the USB driver has already been initialized with [[../../DriverInit|DriverInit]]. KBDInit resets the callback address for use with the keyboard, so the callback address passed to U_CALL_INIT will not be used.

Use [[../KBDVersion|KBDVersion]] to find the exact amount of memory required for the keyboard driver's RAM, or just use 32 bytes as a safe static value.

The current version of usb8x does not set the LED indicators on the keyboard to indicate caps/num/scroll lock. If bit 0 of the flag byte is reset, however, the driver will still keep track of the lock status and modify keypresses as appropriate.

See Also

  • [[../KBDGetKey|KBDGetKey]] - Get keypresses