83Plus:Software:usb8x/Asm Interface/SetCallBack

From WikiTI
Jump to: navigation, search

Synopsis

Name: SetCallBack

Minimum usb8x version: 0.11

Sets the system callback address

Inputs

  • DE: Address of callback routine

Outputs

  • None

Destroys

  • BC, HL

Notes

If you are using [[../AutoSetup|AutoSetup]] or any of the internal driver initialization routines (e.g. [[../Mouse/MouseInit|MouseInit]]) you do not need to use this routine because those routines will set the callback address for you. However, if you are setting up the device manually using [[../SetupInPipe|SetupInPipe]], then you should use this routine to setup a callback to handle incoming data.

If you are accessing usb8x from an application, the callback routine must be located in RAM. If you initialized the U_CALL interface using U_CALL_INIT, then a callback wrapper to call the routine you passed to U_CALL_INIT has already been created for you. You can reference it as USBDriverCall+offCallBack.