3 * - By John Hodge (thePowersGang)
6 * - Definitions for opaque structures
8 #ifndef _UDI_INTERNAL_H_
9 #define _UDI_INTERNAL_H_
11 #define NEW(type,extra) (type*)calloc(sizeof(type)extra,1)
12 #define NEW_wA(type,fld,cnt) NEW(type,+(sizeof(((type*)NULL)->fld[0])*cnt))
14 typedef struct sUDI_PropMessage tUDI_PropMessage;
15 typedef struct sUDI_PropRegion tUDI_PropRegion;
17 typedef struct sUDI_DriverModule tUDI_DriverModule;
18 typedef struct sUDI_DriverInstance tUDI_DriverInstance;
19 typedef struct sUDI_DriverRegion tUDI_DriverRegion;
21 struct sUDI_PropMessage
28 struct sUDI_PropRegion
31 UDI_REGIONTYPE_NORMAL,
35 UDI_REGIONBINDING_STATIC,
36 UDI_REGIONBINDING_DYNAMIC,
44 UDI_REGIONLATENCY_NONOVERRRUNABLE,
45 UDI_REGIONLATENCY_POWERFAIL,
46 UDI_REGIONLATENCY_OVERRUNNABLE,
47 UDI_REGIONLATENCY_RETRYABLE,
49 UDI_REGIONLATENCY_NONCTRITICAL,
51 udi_ubit32_t OverrunTime;
56 struct sUDI_DriverModule
58 tUDI_DriverModule *Next;
63 const char *ModuleName;
65 tUDI_PropMessage *Messages; // Sorted list
68 tUDI_PropRegion *RegionTypes;
70 int nSecondaryRegions;
73 struct sUDI_DriverInstance
75 tUDI_DriverModule *Module;
76 udi_channel_t ManagementChannel;
77 tUDI_DriverRegion *Regions[];
80 struct sUDI_DriverRegion
82 udi_init_context_t *InitContext;
91 extern udi_channel_t UDI_CreateChannel(enum eUDI_MetaLang metalang, udi_index_t meta_ops_num,
92 tUDI_DriverInstance *ThisEnd, udi_index_t ThisOpsIndex,
93 tUDI_DriverInstance *OtherEnd, udi_index_t OtherOpsIndex);
95 extern const void *UDI_int_ChannelPrepForCall(udi_cb_t *gcb, enum eUDI_MetaLang metalang);