Difference between revisions of "83Plus:Software:usb8x/Asm Interface/KBD/KBDInit"

From WikiTI
Jump to: navigation, search
(Notes: callback info)
(callback bc->ix, flags a->b)
 
Line 9: Line 9:
 
* HL: Address of buffer for keyboard driver's RAM storage
 
* HL: Address of buffer for keyboard driver's RAM storage
 
* DE: Address of temporary buffer for descriptors
 
* DE: Address of temporary buffer for descriptors
* A: Flags
+
* B: Flags
 
** bit 0: reset = auto handle lock keys, reset = pass back locks as regular keys
 
** bit 0: reset = auto handle lock keys, reset = pass back locks as regular keys
 
** bit 1: Initial state of CAPS LOCK key
 
** bit 1: Initial state of CAPS LOCK key
Line 27: Line 27:
 
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.
 
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 passthrough callback will use the callback you specified during U_CALL_INIT if you're using the U_CALL system.  Otherwise specifiy the callback in register BC.
+
The passthrough callback will use the callback you specified during U_CALL_INIT if you're using the U_CALL system.  Otherwise specifiy the callback in register IX.
  
 
== See Also ==
 
== See Also ==
 
* [[../KBDGetKey|KBDGetKey]] - Get keypresses
 
* [[../KBDGetKey|KBDGetKey]] - Get keypresses

Latest revision as of 13:52, 8 September 2006

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
    • bit 4: set = pass through call-backs to U_CALL_INIT's call-back

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 passthrough callback will use the callback you specified during U_CALL_INIT if you're using the U_CALL system. Otherwise specifiy the callback in register IX.

See Also

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