From: John Hodge Date: Mon, 7 Oct 2013 00:50:13 +0000 (+0800) Subject: Module/UDI - Implementing parts of MEI (abusing CPP for fun and profit) X-Git-Tag: rel0.15~132 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e7b8e2df61ce667f42043d746c148b06b5a4820a;p=tpg%2Facess2.git Module/UDI - Implementing parts of MEI (abusing CPP for fun and profit) --- diff --git a/KernelLand/Modules/Interfaces/UDI/Makefile b/KernelLand/Modules/Interfaces/UDI/Makefile index 886674bd..2406a7cb 100644 --- a/KernelLand/Modules/Interfaces/UDI/Makefile +++ b/KernelLand/Modules/Interfaces/UDI/Makefile @@ -7,7 +7,7 @@ CPPFLAGS = -I../../../../UDI/include LIB_OBJS := logging.o strmem.o imc.o mem.o buf.o cb.o LIB_OBJS += queues.o time.o attr.o LIB_OBJS += meta_mgmt.o meta_gio.o -LIB_OBJS += physio.o physio/meta_bus.o physio/meta_intr.o physio/pio.o physio/dma.o +LIB_OBJS += physio.o physio/meta_bus.o physio/pio.o physio/dma.o LIB_OBJS += scsi.o LIB_OBJS += udi_nic.o # - UDI->Acess Translation Layer diff --git a/KernelLand/Modules/Interfaces/UDI/udi_internal.h b/KernelLand/Modules/Interfaces/UDI/udi_internal.h index 9cc835a5..6476c2f6 100644 --- a/KernelLand/Modules/Interfaces/UDI/udi_internal.h +++ b/KernelLand/Modules/Interfaces/UDI/udi_internal.h @@ -200,6 +200,7 @@ struct sUDI_DeferredCall extern void UDI_int_DeferredThread(void *unused); // Worker started by main.c extern void UDI_int_AddDeferred(tUDI_DeferredCall *Call); extern void UDI_int_MakeDeferredCb(udi_cb_t *cb, udi_op_t *handler); + extern void UDI_int_MakeDeferredCbU8(udi_cb_t *cb, udi_op_t *handler, udi_ubit8_t arg1); extern void UDI_int_MakeDeferredCbS(udi_cb_t *cb, udi_op_t *handler, udi_status_t status); diff --git a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/meta_bus.c b/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/meta_bus.c index c0631f21..1aed3ab4 100644 --- a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/meta_bus.c +++ b/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/meta_bus.c @@ -11,31 +11,26 @@ #include #include "../../udi_internal.h" -// === GLOBALS == -udi_layout_t cMetaLang_BusBridge_IntrAttachCbLayout[] = { - UDI_DL_STATUS_T, - UDI_DL_UBIT8_T, - UDI_DL_ORIGIN_T, // TODO: handle - 0 -}; -tUDI_MetaLang cMetaLang_BusBridge = { - "udi_bridge", - // CB Types - 5, - { - {0}, // 0: Empty - {sizeof(udi_bus_bind_cb_t), NULL}, // Defined, but is just a gcb - {sizeof(udi_intr_attach_cb_t), NULL}, - {sizeof(udi_intr_detach_cb_t), NULL}, - {sizeof(udi_intr_event_cb_t), NULL} - } -}; +#define USE_MEI 0 + +#define udi_mei_info udi_meta_info__bridge + +extern tUDI_MetaLang cMetaLang_BusBridge; +extern udi_mei_init_t udi_meta_info__bridge; // === EXPORTS === -EXPORT(udi_bus_unbind_req); -EXPORT(udi_bus_unbind_ack); EXPORT(udi_bus_bind_req); EXPORT(udi_bus_bind_ack); +EXPORT(udi_bus_unbind_req); +EXPORT(udi_bus_unbind_ack); +EXPORT(udi_intr_attach_req); +EXPORT(udi_intr_attach_ack); +EXPORT(udi_intr_attach_ack_unused); +EXPORT(udi_intr_detach_req); +EXPORT(udi_intr_detach_ack); +EXPORT(udi_intr_detach_ack_unused); +EXPORT(udi_intr_event_ind); +EXPORT(udi_intr_event_rdy); #define PREP_OPS(type,ml,num) const type *ops = UDI_int_ChannelPrepForCall(UDI_GCB(cb), ml, num); \ if(!ops) { Log_Warning("UDI", "%s on wrong channel type", __func__); return ; } @@ -44,6 +39,7 @@ EXPORT(udi_bus_bind_ack); if(!ops) { Log_Warning("UDI", "%s on wrong channel type", __func__); return ; } // === CODE === +#if !USE_MEI void udi_bus_unbind_req(udi_bus_bind_cb_t *cb) { UNIMPLEMENTED(); @@ -73,6 +69,7 @@ static void _unmarshal_bus_bind_ack(tUDI_DeferredCall *Call) { LOG("Call=%p", Call); struct marshalled_bus_bind_ack *info = (void*)Call; + UDI_int_ChannelReleaseFromCall( Call->cb ); ((udi_bus_bind_ack_op_t*)Call->Handler)( UDI_MCB(Call->cb, udi_bus_bind_cb_t), info->dma_constraints, @@ -101,3 +98,171 @@ void udi_bus_bind_ack( call->status = status; UDI_int_AddDeferred(&call->Call); } + +void udi_intr_attach_req(udi_intr_attach_cb_t *cb) +{ + LOG("cb=%p", cb); + PREP_OPS(udi_bus_bridge_ops_t, &cMetaLang_BusBridge, UDI_BUS_BRIDGE_OPS_NUM) + UDI_int_MakeDeferredCb( UDI_GCB(cb), (udi_op_t*)ops->intr_attach_req_op ); +} +void udi_intr_attach_ack(udi_intr_attach_cb_t *cb, udi_status_t status) +{ + LOG("cb=%p,status=%i", cb, status); + PREP_OPS(udi_bus_device_ops_t, &cMetaLang_BusBridge, UDI_BUS_DEVICE_OPS_NUM) + UDI_int_MakeDeferredCbS( UDI_GCB(cb), (udi_op_t*)ops->intr_attach_ack_op, status ); +} + +void udi_intr_detach_req(udi_intr_detach_cb_t *cb) +{ + LOG("cb=%p", cb); + PREP_OPS(udi_bus_bridge_ops_t, &cMetaLang_BusBridge, UDI_BUS_BRIDGE_OPS_NUM) + UDI_int_MakeDeferredCb( UDI_GCB(cb), (udi_op_t*)ops->intr_detach_req_op ); +} +void udi_intr_detach_ack(udi_intr_detach_cb_t *cb) +{ + LOG("cb=%p", cb); + PREP_OPS(udi_bus_device_ops_t, &cMetaLang_BusBridge, UDI_BUS_DEVICE_OPS_NUM) + UDI_int_MakeDeferredCb( UDI_GCB(cb), (udi_op_t*)ops->intr_detach_ack_op ); +} +#endif + +void udi_intr_event_ind(udi_intr_event_cb_t *cb, udi_ubit8_t flags) +{ + LOG("cb=%p,flags=0x%x", cb, flags); + PREP_OPS(udi_intr_handler_ops_t, &cMetaLang_BusBridge, UDI_BUS_INTR_HANDLER_OPS_NUM) + UDI_int_MakeDeferredCbU8( UDI_GCB(cb), (udi_op_t*)ops->intr_event_ind_op, flags ); +} + +void udi_intr_event_rdy(udi_intr_event_cb_t *cb) +{ + LOG("cb=%p", cb); + PREP_OPS(udi_intr_dispatcher_ops_t, &cMetaLang_BusBridge, UDI_BUS_INTR_DISPATCH_OPS_NUM) + UDI_int_MakeDeferredCb( UDI_GCB(cb), (udi_op_t*)ops->intr_event_rdy_op ); +} + +void udi_intr_attach_ack_unused(udi_intr_attach_cb_t *intr_attach_cb, udi_status_t status) +{ + Log_Error("UDI", "Driver %s caused %s to be called", + UDI_int_ChannelGetInstance(UDI_GCB(intr_attach_cb), false, NULL)->Module->ModuleName, + __func__); +} +void udi_intr_detach_ack_unused(udi_intr_detach_cb_t *intr_detach_cb) +{ + Log_Error("UDI", "Driver %s caused %s to be called", + UDI_int_ChannelGetInstance(UDI_GCB(intr_detach_cb), false, NULL)->Module->ModuleName, + __func__); +} + +#if USE_MEI +UDI_MEI_STUBS(udi_bus_bind_ack, udi_bus_bind_cb_t, 3, + (dma_constraints, preferred_endianness, status ), + (udi_dma_constraints_t, udi_ubit8_t, udi_status_t), + (UDI_VA_POINTER, UDI_VA_UBIT8_T, UDI_VA_STATUS_T), + UDI_BUS_DEVICE_OPS_NUM, 1) +UDI_MEI_STUBS(udi_bus_unbind_ack, udi_bus_bind_cb_t, 0, + (), (), (), + UDI_BUS_DEVICE_OPS_NUM, 2) +UDI_MEI_STUBS(udi_intr_attach_ack, udi_intr_attach_cb_t, 1, + (status), (udi_status_t), (UDI_VA_STATUS_T), + UDI_BUS_DEVICE_OPS_NUM, 3) +UDI_MEI_STUBS(udi_intr_detach_ack, udi_intr_detach_cb_t, 0, + (), (), (), + UDI_BUS_DEVICE_OPS_NUM, 4) + +UDI_MEI_STUBS(udi_bus_bind_req, udi_bus_bind_cb_t, 0, + (), (), (), + UDI_BUS_BRIDGE_OPS_NUM, 1) +UDI_MEI_STUBS(udi_bus_unbind_req, udi_bus_bind_cb_t, 0, + (), (), (), + UDI_BUS_BRIDGE_OPS_NUM, 2) +UDI_MEI_STUBS(udi_intr_attach_req, udi_intr_attach_cb_t, 0, + (), (), (), + UDI_BUS_BRIDGE_OPS_NUM, 3) +UDI_MEI_STUBS(udi_intr_detach_req, udi_intr_detach_cb_t, 0, + (), (), (), + UDI_BUS_BRIDGE_OPS_NUM, 4) + +#endif + +// === GLOBALS == +udi_layout_t udi_meta_info__bridge__bus_bind_cb[] = { + UDI_DL_END +}; +udi_layout_t udi_meta_info__bridge__intr_attach_cb[] = { + UDI_DL_STATUS_T, + UDI_DL_UBIT8_T, + UDI_DL_PIO_HANDLE_T, + UDI_DL_END +}; +udi_layout_t udi_meta_info__bridge__intr_detach_cb[] = { + UDI_DL_INDEX_T, + UDI_DL_END +}; + +#if USE_MEI +udi_layout_t _noargs_marshal[] = { + UDI_DL_END +}; +udi_layout_t _bus_bind_ack_marshal[] = { + UDI_DL_DMA_CONSTRAINTS_T, + UDI_DL_UBIT8_T, + UDI_DL_STATUS_T, + UDI_DL_END +}; +udi_layout_t _udi_intr_attach_ack_marshal[] = { + UDI_DL_STATUS_T, + UDI_DL_END +}; + +udi_mei_op_template_t udi_meta_info__bridge__bus_ops[] = { + {"udi_bus_bind_req", UDI_MEI_OPCAT_REQ, 0, UDI_BUS_BIND_CB_NUM, UDI_BUS_DEVICE_OPS_NUM,1, 0,0, + udi_bus_bind_req_direct, udi_bus_bind_req_backend, udi_meta_info__bridge__bus_bind_cb, + _noargs_marshal}, + {"udi_bus_unbind_req", UDI_MEI_OPCAT_REQ, 0, UDI_BUS_BIND_CB_NUM, UDI_BUS_DEVICE_OPS_NUM,2, 0,0, + udi_bus_unbind_req_direct, udi_bus_unbind_req_backend, udi_meta_info__bridge__bus_bind_cb, + _noargs_marshal}, + {"udi_intr_attach_req", UDI_MEI_OPCAT_REQ, 0, UDI_BUS_INTR_ATTACH_CB_NUM, UDI_BUS_DEVICE_OPS_NUM,3, 0,0, + udi_intr_attach_req_direct, udi_intr_attach_req_backend, udi_meta_info__bridge__intr_attach_cb, + _noargs_marshal}, + {"udi_intr_detach_req", UDI_MEI_OPCAT_REQ, 0, UDI_BUS_INTR_DETACH_CB_NUM, UDI_BUS_DEVICE_OPS_NUM,4, 0,0, + udi_intr_detach_req_direct, udi_intr_detach_req_backend, udi_meta_info__bridge__intr_detach_cb, + _noargs_marshal}, + {0} +}; +udi_mei_op_template_t udi_meta_info__bridge__device_ops[] = { + {"udi_bus_bind_ack", UDI_MEI_OPCAT_ACK, 0, UDI_BUS_BIND_CB_NUM, 0,0, 0,0, + udi_bus_bind_ack_direct, udi_bus_bind_ack_backend, udi_meta_info__bridge__bus_bind_cb, + _bus_bind_ack_marshal}, + {"udi_bus_unbind_ack", UDI_MEI_OPCAT_ACK, 0, UDI_BUS_BIND_CB_NUM, 0,0, 0,0, + udi_bus_unbind_ack_direct, udi_bus_unbind_ack_backend, udi_meta_info__bridge__bus_bind_cb, + _noargs_marshal}, + {"udi_intr_attach_ack", UDI_MEI_OPCAT_ACK, 0, UDI_BUS_INTR_ATTACH_CB_NUM, 0,0, 0,0, + udi_intr_attach_ack_direct, udi_intr_attach_ack_backend, udi_meta_info__bridge__intr_attach_cb, + _udi_intr_attach_ack_marshal}, + {"udi_intr_detach_ack", UDI_MEI_OPCAT_ACK, 0, UDI_BUS_INTR_DETACH_CB_NUM, 0,0, 0,0, + udi_intr_detach_ack_direct, udi_intr_detach_ack_backend, udi_meta_info__bridge__intr_detach_cb, + _noargs_marshal}, + {0} +}; +udi_mei_ops_vec_template_t udi_meta_info__bridge_ops[] = { + {UDI_BUS_BRIDGE_OPS_NUM, UDI_MEI_REL_EXTERNAL|UDI_MEI_REL_BIND, udi_meta_info__bridge__bus_ops}, + {UDI_BUS_DEVICE_OPS_NUM, UDI_MEI_REL_EXTERNAL|UDI_MEI_REL_BIND, udi_meta_info__bridge__device_ops}, + {0} +}; +udi_mei_init_t udi_meta_info__bridge = { + udi_meta_info__bridge_ops, + NULL +}; +#endif +tUDI_MetaLang cMetaLang_BusBridge = { + "udi_bridge", + // CB Types + 5, + { + {0}, // 0: Empty + {sizeof(udi_bus_bind_cb_t), udi_meta_info__bridge__bus_bind_cb}, + {sizeof(udi_intr_attach_cb_t), udi_meta_info__bridge__intr_attach_cb}, + {sizeof(udi_intr_detach_cb_t), udi_meta_info__bridge__intr_detach_cb}, + {sizeof(udi_intr_event_cb_t), NULL} + } +}; diff --git a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/meta_intr.c b/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/meta_intr.c deleted file mode 100644 index 38c263e6..00000000 --- a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/meta_intr.c +++ /dev/null @@ -1,59 +0,0 @@ -/** - * \file physio/meta_intr.c - * \author John Hodge (thePowersGang) - */ -#include -#include -#include -#include "../../udi_internal.h" - -// === EXPORTS === -EXPORT(udi_intr_attach_req); -EXPORT(udi_intr_attach_ack); -EXPORT(udi_intr_attach_ack_unused); -EXPORT(udi_intr_detach_req); -EXPORT(udi_intr_detach_ack); -EXPORT(udi_intr_detach_ack_unused); -EXPORT(udi_intr_event_ind); -EXPORT(udi_intr_event_rdy); - -// === CODE === -void udi_intr_attach_req(udi_intr_attach_cb_t *intr_attach_cb) -{ - UNIMPLEMENTED(); -} -void udi_intr_attach_ack(udi_intr_attach_cb_t *intr_attach_cb, udi_status_t status) -{ - UNIMPLEMENTED(); -} -void udi_intr_attach_ack_unused(udi_intr_attach_cb_t *intr_attach_cb, udi_status_t status) -{ - Log_Error("UDI", "Driver %s caused %s to be called", - UDI_int_ChannelGetInstance(UDI_GCB(intr_attach_cb), false, NULL)->Module->ModuleName, - __func__); -} - -void udi_intr_detach_req(udi_intr_detach_cb_t *intr_detach_cb) -{ - UNIMPLEMENTED(); -} -void udi_intr_detach_ack(udi_intr_detach_cb_t *intr_detach_cb) -{ - UNIMPLEMENTED(); -} -void udi_intr_detach_ack_unused(udi_intr_detach_cb_t *intr_detach_cb) -{ - Log_Error("UDI", "Driver %s caused %s to be called", - UDI_int_ChannelGetInstance(UDI_GCB(intr_detach_cb), false, NULL)->Module->ModuleName, - __func__); -} - -void udi_intr_event_ind(udi_intr_event_cb_t *intr_event_cb, udi_ubit8_t flags) -{ - UNIMPLEMENTED(); -} - -void udi_intr_event_rdy(udi_intr_event_cb_t *intr_event_cb) -{ - UNIMPLEMENTED(); -} diff --git a/UDI/include/udi.h b/UDI/include/udi.h index e4ddb94b..50c7077a 100644 --- a/UDI/include/udi.h +++ b/UDI/include/udi.h @@ -123,5 +123,6 @@ typedef udi_op_t * const udi_ops_vector_t; #include "udi/meta_mgmt.h" // Management Metalanguage #include "udi/meta_gio.h" // General IO Metalanguage #include "udi/init.h" // Init +#include "udi/mei.h" // Init #endif diff --git a/UDI/include/udi/arch/ia32.h b/UDI/include/udi/arch/ia32.h index 4608aa36..149aa102 100644 --- a/UDI/include/udi/arch/ia32.h +++ b/UDI/include/udi/arch/ia32.h @@ -34,20 +34,20 @@ typedef int64_t udi_timestamp_t; * \name va_arg wrapper * \{ */ -#define UDI_VA_ARG(pvar, type, va_code) va_arg(pvar,type) -#define UDI_VA_UBIT8_T -#define UDI_VA_SBIT8_T -#define UDI_VA_UBIT16_T -#define UDI_VA_SBIT16_T -#define UDI_VA_UBIT32_T -#define UDI_VA_SBIT32_T -#define UDI_VA_BOOLEAN_T -#define UDI_VA_INDEX_T -#define UDI_VA_SIZE_T -#define UDI_VA_STATUS_T -#define UDI_VA_CHANNEL_T -#define UDI_VA_ORIGIN_T -#define UDI_VA_POINTER +#define UDI_VA_ARG(pvar, type, va_code) va_arg(pvar,va_code) +#define UDI_VA_UBIT8_T unsigned int +#define UDI_VA_SBIT8_T int +#define UDI_VA_UBIT16_T unsigned int +#define UDI_VA_SBIT16_T int +#define UDI_VA_UBIT32_T uint32_t +#define UDI_VA_SBIT32_T int32_t +#define UDI_VA_BOOLEAN_T int +#define UDI_VA_INDEX_T int +#define UDI_VA_SIZE_T unsigned int +#define UDI_VA_STATUS_T int +#define UDI_VA_CHANNEL_T udi_channel_t +#define UDI_VA_ORIGIN_T udi_origin_t +#define UDI_VA_POINTER void* /** * \} */ diff --git a/UDI/include/udi/mei.h b/UDI/include/udi/mei.h index ef764054..95edb6bf 100644 --- a/UDI/include/udi/mei.h +++ b/UDI/include/udi/mei.h @@ -10,7 +10,7 @@ typedef const struct udi_mei_init_s udi_mei_init_t; typedef const struct udi_mei_ops_vec_template_s udi_mei_ops_vec_template_t; -typedef const struct uid_mei_op_template_s uid_mei_op_template_t; +typedef const struct uid_mei_op_template_s udi_mei_op_template_t; typedef udi_ubit8_t udi_mei_enumeration_rank_func_t(udi_ubit32_t attr_device_match, void **attr_value_list); typedef void udi_mei_direct_stub_t(udi_op_t *op, udi_cb_t *gcb, va_list arglist); @@ -65,24 +65,42 @@ struct uid_mei_op_template_s #define UDI_MEI_MAX_VISIBLE_SIZE 2000 #define UDI_MEI_MAX_MARSHAL_SIZE 4000 + +extern void udi_mei_call(udi_cb_t *gcb, udi_mei_init_t *meta_info, udi_index_t meta_ops_num, udi_index_t vec_idx, ...); + #define _UDI_MEI_FIRST(lst, ...) lst -#define _UDI_MEI_OTHER(lst, ...) __VA_ARGS__ +#define _UDI_MEI_OTHER(lst, ...) (__VA_ARGS__) #define _UDI_MEI_VARG(type,name,vatype) \ type name = UDI_VA_ARG(arglist, type, vatype); -#define _UDI_MEI_VARGS0() -#define _UDI_MEI_VARGS1(args,argt,argva) \ - _UDI_MEI_VARG(_UDI_MEI_FIRST(argt), _UDI_MEI_FIRST(args),_UDI_MEI_FIRST(argva)) -#define _UDI_MEI_VARGS2(args,argt,argva) \ - _UDI_MEI_VARG(_UDI_MEI_FIRST(argt), _UDI_MEI_FIRST(args),_UDI_MEI_FIRST(argva)) \ - _UDI_MEI_VARGS1( _UDI_MEI_OTHER(argt), _UDI_MEI_OTHER(args), _UDI_MEI_OTHER(argva) ) +#define _UDI_MEI_VARGS0(argt,args,argva) +#define _UDI_MEI_VARGS1(argt,args,argva) \ + _UDI_MEI_VARG(_UDI_MEI_FIRST argt, _UDI_MEI_FIRST args, _UDI_MEI_FIRST argva) +#define _UDI_MEI_VARGS2(argt,args,argva) \ + _UDI_MEI_VARG(_UDI_MEI_FIRST argt, _UDI_MEI_FIRST args,_UDI_MEI_FIRST argva ) \ + _UDI_MEI_VARGS1( _UDI_MEI_OTHER argt, _UDI_MEI_OTHER args, _UDI_MEI_OTHER argva ) +#define _UDI_MEI_VARGS3(argt,args,argva) \ + _UDI_MEI_VARG(_UDI_MEI_FIRST argt, _UDI_MEI_FIRST args, _UDI_MEI_FIRST argva) \ + _UDI_MEI_VARGS2( _UDI_MEI_OTHER argt, _UDI_MEI_OTHER args, _UDI_MEI_OTHER argva ) + +#define _UDI_MEI_ARG_LIST0(t,a) +#define _UDI_MEI_ARG_LIST1(t,a) , _UDI_MEI_FIRST t _UDI_MEI_FIRST a +#define _UDI_MEI_ARG_LIST2(t,a) , _UDI_MEI_FIRST t _UDI_MEI_FIRST a \ + _UDI_MEI_ARG_LIST1(_UDI_MEI_OTHER t, _UDI_MEI_OTHER a) +#define _UDI_MEI_ARG_LIST3(t,a) , _UDI_MEI_FIRST t _UDI_MEI_FIRST a \ + _UDI_MEI_ARG_LIST2(_UDI_MEI_OTHER t, _UDI_MEI_OTHER a) + +#define _UDI_ARG_LIST_0() +#define _UDI_ARG_LIST_1(a) ,a +#define _UDI_ARG_LIST_2(a,b) ,a,b +#define _UDI_ARG_LIST_3(a,b,c) ,a,b,c #define UDI_MEI_STUBS(op_name, cb_type, argc, args, arg_types, arg_va_list, meta_ops_num, vec_idx) \ - void op_name(cb_type *cb, _UDI_ARG_LIST_##argc args ) {\ - udi_mei_call(UDI_GCB(cb), &udi_mei_info, meta_ops_num, vec_idx, args);\ + void op_name(cb_type *cb _UDI_MEI_ARG_LIST##argc(arg_types, args) ) {\ + udi_mei_call(UDI_GCB(cb), &udi_mei_info, meta_ops_num, vec_idx _UDI_ARG_LIST_##argc args);\ }\ - void op_name##_direct(udi_op_t *op, udi_cb_t *gcb, va_lis arglist) {\ - _UDI_MEI_VARGS##argc(args ,## arg_types ,## arg_va_list)\ - (*(op_name##_op_t)op)(UDI_MCB(gcb, cb_type) ,## args);\ + void op_name##_direct(udi_op_t *op, udi_cb_t *gcb, va_list arglist) {\ + _UDI_MEI_VARGS##argc(arg_types, args, arg_va_list)\ + (*(op_name##_op_t*)op)(UDI_MCB(gcb, cb_type) _UDI_ARG_LIST_##argc args);\ }\ void op_name##_backend(udi_op_t *op, udi_cb_t *gcb, void *marshal_space) {\ } diff --git a/UDI/include/udi_physio.h b/UDI/include/udi_physio.h index 51fc049b..ae134b0f 100644 --- a/UDI/include/udi_physio.h +++ b/UDI/include/udi_physio.h @@ -10,6 +10,9 @@ //# error "UDI_PHYSIO_VERSION must be defined" //#endif +#define UDI_DL_PIO_HANDLE_T 200 +#define UDI_DL_DMA_CONSTRAINTS_T 201 + // === TYPEDEFS === // DMA Core typedef struct udi_dma_handle_s *udi_dma_handle_t;