SDC C-Project CF Review 프로그램
kojingeun
2023-11-24 c112cf54a238afa473e7eb0ea6298e06f4957658
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/***************************************************************************
  (C) Copyright DELTA TAU DATA SYSTEMS Inc., 1992
 
  Title:    intr.h
 
  Version:  1.00
 
  Date:   12/11/1992
 
  Author(s):  Dennis Smith
 
  Header file for PMAC NT interrupt worker thread.
 
  Note(s):
 
----------------------------------------------------------------------------
 
  Change log:
 
    Date       Rev   Who      Description
  --------- ----- ----- --------------------------------------------
 
***************************************************************************/
#ifndef _INTR_H
  #define _INTR_H
 
#include "private.h"
#include <process.h>
 
/******************************************************************************
 * data streaming.
 *
 * Call PmacInitInterrupts to prepare for interrupts.
 * The callback function specified in PmacInitInterrupts will be called
 * with the interrupt that has completed.
 *
 * Finally call PmacTermInterrupts to tidy up.
 ******************************************************************************/
 
/*
 * these are the parameters we need to issue a DriverCallback. A
 * pointer to one of these structs is passed on InterruptInit
 * If the pointer is null, we don't need callbacks.
 */
typedef struct _MCCALLBACK {
    DWORD  dwCallback;
    DWORD  dwFlags;
    DWORD  dwDevice;
    DWORD  dwUser;
    DWORD  dwMask;
} MCCALLBACK, *PMCCALLBACK;
 
// Callback function pointer
typedef void (FAR WINAPI * PMACINTRPROC) ( DWORD msg, PINTRBUFFER pBuffer );
 
// Functions --------------------------------------------------------------
  #ifdef __cplusplus
extern "C" {
  #endif
 
  // Functions exported
  BOOL  CALLBACK PmacINTRWndMsgInit( DWORD dwDevice, HWND hWnd, UINT msg, ULONG ulMask );
  BOOL  CALLBACK PmacINTRFuncCallInit( DWORD dwDevice, PMACINTRPROC pFunc, DWORD msg, ULONG ulMask );
  BOOL  CALLBACK PmacINTRFireEventInit( DWORD dwDevice, HANDLE hEvent, ULONG ulMask );
  BOOL  CALLBACK PmacINTRRunThreadInit( DWORD dwDevice, LPTHREAD_START_ROUTINE pFunc, UINT msg, ULONG ulMask );
  BOOL  CALLBACK PmacINTRTerminate( DWORD dwDevice );
 
  // Functions not exported
  BOOL  CALLBACK PmacINTRInit( DWORD dwDevice, DWORD dwCallback, DWORD dwFlags,
                               DWORD dwUser, ULONG mask );
  VOID  CALLBACK PmacINTRCallback( DWORD dwDevice );
//  VOID  CALLBACK PmacINTRQueue( DWORD dwDevice, DWORD dwEvent );
  VOID  CALLBACK PmacINTRComplete( DWORD dwDevice, DWORD dwEvent );
  BOOL  CALLBACK PmacINTRProcessFunction( DWORD dwDevice, MCFUNC Func, DWORD Param,
                     LPDWORD pResult );
  UINT  CALLBACK PmacINTRThreadInit( DWORD * dwDev );
  VOID  PmacAddINTRCallback( DWORD dwDevice, DWORD dwCallback, DWORD dwFlags,
                              DWORD dwUser, ULONG ulMask );
 
  BOOL CALLBACK PmacINTRSetupMask(DWORD dwDevice, ULONG ulMask);
  BOOL CALLBACK PmacINTRSetupInterruptEvent(DWORD dwDevice,CHAR *szName);
 
  #ifdef __cplusplus
}
  #endif
 
#endif // _INTR_H