Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.5 KiB

  1. /* --------------------------------------------------------------------
  2. ** Module : wowmmcb.h
  3. **
  4. ** Description : Interrupt callback stuff for Multi-Media.
  5. **
  6. ** History: : Created 09-Nov-1992 by StephenE
  7. **
  8. ** --------------------------------------------------------------------
  9. */
  10. #ifndef WOWMMCB_H
  11. #define WOWMMCB_H
  12. /*
  13. ** This header file will go through both 16 bit and 32 bit compilers.
  14. ** In 16 bit land UNALIGNED is not required, on 32 bit land UNALIGNED
  15. ** would have been #defined by the time this file was #included because
  16. ** this file is always included after wow32.h. This means the following
  17. ** #define is always a no-op with 16 bit compilers and ignored with
  18. ** 32 bit compilers.
  19. */
  20. #ifndef UNALIGNED
  21. #define UNALIGNED
  22. #endif
  23. extern void call_ica_hw_interrupt(int, int, int);
  24. /* --------------------------------------------------------------------
  25. ** Hardware Interrupts:
  26. **
  27. ** IRQ: Interrupt: ICA: Line: Description:
  28. ** -------------------------------------------------------------------
  29. ** IRQ0 0x08 0 0 Timer Tick every 18.2 times per second.
  30. ** IRQ1 0x09 0 1 Keyboard service required.
  31. ** IRQ2 0x0A 0 2 INT from slave 8259A.
  32. ** IRQ8 0x70 1 0 Real time clock service.
  33. ** IRQ9 0x71 1 1 Software redirected to IRQ2.
  34. ** IRQ10 0x72 1 2 Reserved.
  35. ** IRQ11 0x73 1 3 Reserved.
  36. ** IRQ12 0x74 1 4 Reserved.
  37. ** IRQ13 0x75 1 5 Numeric co-processor
  38. ** IRQ14 0x76 1 6 Fixed disk controller
  39. ** IRQ15 0x77 1 7 Reserved.
  40. ** IRQ3 0x0B 0 3 Com2 service request.
  41. ** IRQ4 0x0C 0 4 Com1 service request.
  42. ** IRQ5 0x0D 0 5 Data request from LPT2:
  43. ** IRQ6 0x0E 0 6 Floppy disk service required.
  44. ** IRQ7 0x0F 0 7 Data request from LPT1:
  45. **
  46. ** --------------------------------------------------------------------
  47. */
  48. #ifdef NEC_98
  49. #define MULTIMEDIA_LINE 4
  50. #define MULTIMEDIA_ICA 1
  51. #define MULTIMEDIA_INTERRUPT 0x14
  52. #else // NEC_98
  53. #define MULTIMEDIA_LINE 2
  54. #define MULTIMEDIA_ICA 1
  55. #define MULTIMEDIA_INTERRUPT 0x72
  56. #endif // NEC_98
  57. #define CALLBACK_ARGS_SIZE 16
  58. typedef struct _CALLBACK_ARGS { /* cbargs */
  59. DWORD dwFlags; // Flags to identify the type of callback.
  60. DWORD dwFunctionAddr; // 16:16 address of the function to be called
  61. WORD wHandle; // The handle or ID of the device
  62. WORD wMessage; // The message to be passed to function
  63. DWORD dwInstance; // User data
  64. DWORD dwParam1; // Device data 1
  65. DWORD dwParam2; // Device data 2
  66. } CALLBACK_ARGS;
  67. typedef struct _CALLBACK_DATA { /* cbdata */
  68. WORD wRecvCount; // The number of interrupts received
  69. WORD wSendCount; // The number of interrupts sent
  70. CALLBACK_ARGS args[CALLBACK_ARGS_SIZE]; // Interrupt arguments
  71. WORD wIntsCount; // The number of interrupts received
  72. } CALLBACK_DATA;
  73. typedef CALLBACK_DATA FAR *VPCALLBACK_DATA; // 16:16 pointer type
  74. typedef CALLBACK_ARGS FAR *VPCALLBACK_ARGS; // 16:16 pointer type
  75. typedef CALLBACK_DATA UNALIGNED *PCALLBACK_DATA; // 0:32 pointer type
  76. typedef CALLBACK_ARGS UNALIGNED *PCALLBACK_ARGS; // 0:32 pointer type
  77. VOID FAR PASCAL Notify_Callback_Data( VPCALLBACK_DATA vpCallbackData );
  78. #endif