From: John Hodge Date: Sun, 6 Oct 2013 11:11:33 +0000 (+0800) Subject: UDI/incldue - Update UDI headers for implementation of attributes/DMA X-Git-Tag: rel0.15~136 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=aed7d3a6a71a4bb76d94c8882894ae9180b460fd;p=tpg%2Facess2.git UDI/incldue - Update UDI headers for implementation of attributes/DMA --- diff --git a/UDI/include/physio/meta_intr.h b/UDI/include/physio/meta_intr.h index 506eb0c8..7f8357b0 100644 --- a/UDI/include/physio/meta_intr.h +++ b/UDI/include/physio/meta_intr.h @@ -72,13 +72,13 @@ struct udi_intr_event_cb_s -extern void udi_intr_attach_req(udi_intr_attach_cb_t *intr_attach_cb); -extern void udi_intr_attach_ack(udi_intr_attach_cb_t *intr_attach_cb, udi_status_t status); -//extern void udi_intr_attach_ack_unused(udi_intr_attach_cb_t *intr_attach_cb, udi_status_t status); +extern udi_intr_attach_req_op_t udi_intr_attach_req; +extern udi_intr_attach_ack_op_t udi_intr_attach_ack; +extern udi_intr_attach_ack_op_t udi_intr_attach_ack_unused; extern void udi_intr_detach_req(udi_intr_detach_cb_t *intr_detach_cb); extern void udi_intr_detach_ack(udi_intr_detach_cb_t *intr_detach_cb); -//extern void udi_intr_detach_ack_unused(udi_intr_detach_cb_t *intr_detach_cb); +extern udi_intr_detach_ack_op_t udi_intr_detach_ack_unused; extern void udi_intr_event_ind(udi_intr_event_cb_t *intr_event_cb, udi_ubit8_t flags); diff --git a/UDI/include/physio/pio.h b/UDI/include/physio/pio.h index aabc97f8..15725970 100644 --- a/UDI/include/physio/pio.h +++ b/UDI/include/physio/pio.h @@ -6,9 +6,9 @@ #include #include -typedef _udi_handle_t udi_pio_handle_t; -/* Null handle value for udi_pio_handle_t */ -#define UDI_NULL_PIO_HANDLE _NULL_HANDLE + +typedef struct udi_pio_handle_s *udi_pio_handle_t; // opaque +#define UDI_NULL_PIO_HANDLE NULL typedef void udi_pio_map_call_t(udi_cb_t *gcb, udi_pio_handle_t new_pio_handle); diff --git a/UDI/include/udi/attr.h b/UDI/include/udi/attr.h index 729f4698..3e83e2ab 100644 --- a/UDI/include/udi/attr.h +++ b/UDI/include/udi/attr.h @@ -1,8 +1,12 @@ /** - * \file udi_attr.h + * Acess2 UDI Layer + * - By John Hodge (thePowersGang) + * + * udi/attr.h + * - Instance Attribute Management */ -#ifndef _UDI_ATTR_H_ -#define _UDI_ATTR_H_ +#ifndef _UDI__ATTR_H_ +#define _UDI__ATTR_H_ typedef struct udi_instance_attr_list_s udi_instance_attr_list_t; typedef udi_ubit8_t udi_instance_attr_type_t; @@ -50,5 +54,22 @@ enum UDI_ATTR_FILE }; +typedef void udi_instance_attr_get_call_t(udi_cb_t *gcb, udi_instance_attr_type_t attr_type, udi_size_t actual_length); + +extern void udi_instance_attr_get(udi_instance_attr_get_call_t *callback, udi_cb_t *gcb, + const char *attr_name, udi_ubit32_t child_ID, + void *attr_value, udi_size_t attr_length + ); + +typedef void udi_instance_attr_set_call_t(udi_cb_t *gcb, udi_status_t status); + +extern void udi_instance_attr_set(udi_instance_attr_set_call_t *callback, udi_cb_t *gcb, + const char *attr_name, udi_ubit32_t child_ID, + const void *attr_value, udi_size_t attr_length, udi_ubit8_t attr_type + ); + +#define UDI_INSTANCE_ATTR_DELETE(callback, gcb, attr_name) \ + udi_instance_attr_set(callbac, gcb, attr_name, NULL, NULL, 0, UDI_ATTR_NONE) + #endif diff --git a/UDI/include/udi_physio.h b/UDI/include/udi_physio.h index f5c3ab15..51fc049b 100644 --- a/UDI/include/udi_physio.h +++ b/UDI/include/udi_physio.h @@ -12,13 +12,13 @@ // === TYPEDEFS === // DMA Core -typedef _udi_handle_t udi_dma_handle_t; +typedef struct udi_dma_handle_s *udi_dma_handle_t; #define UDI_NULL_DMA_HANDLE _NULL_HANDLE typedef uint64_t udi_busaddr64_t; //!< \note Opaque typedef struct udi_scgth_element_32_s udi_scgth_element_32_t; typedef struct udi_scgth_element_64_s udi_scgth_element_64_t; typedef struct udi_scgth_s udi_scgth_t; -typedef _udi_handle_t udi_dma_constraints_t; +typedef struct udi_dma_constraints_s *udi_dma_constraints_t; #define UDI_NULL_DMA_CONSTRAINTS _NULL_HANDLE /** * \name DMA constraints attributes