From 2722e76f513ba7be80e63f1f49f2095d39759f09 Mon Sep 17 00:00:00 2001 From: zilio nicolas Date: Thu, 10 Sep 2015 20:40:15 +0200 Subject: more towards views --- pcilib/pci.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pcilib/pci.h') diff --git a/pcilib/pci.h b/pcilib/pci.h index 00528e1..657c335 100644 --- a/pcilib/pci.h +++ b/pcilib/pci.h @@ -62,6 +62,8 @@ struct pcilib_s { size_t num_banks, num_protocols, num_ranges; /**< Number of registered banks, protocols, and register ranges */ size_t num_engines; /**< Number of configured DMA engines */ size_t dyn_banks; /**< Number of configured dynamic banks */ + size_t num_enum_views,alloc_enum_views; /**< Number of configured and allocated views of type enum*/ + size_t num_formula_views,alloc_formula_views; /**< Number of configured and allocated views of type formula*/ pcilib_register_description_t *registers; /**< List of currently defined registers (from all sources) */ pcilib_register_bank_description_t banks[PCILIB_MAX_REGISTER_BANKS + 1]; /**< List of currently defined register banks (from all sources) */ @@ -81,6 +83,9 @@ struct pcilib_s { struct pcilib_locking_s locks; /**< Context of locking subsystem */ struct pcilib_xml_s xml; /**< XML context */ + pcilib_view_enum2_t* enum_views; /**< list of currently defined views of type enum*/ + pcilib_view_formula_t* formula_views; /**< list of currently defined views of type formula*/ + #ifdef PCILIB_FILE_IO int file_io_handle; #endif /* PCILIB_FILE_IO */ -- cgit v1.2.3 From 60c6bf9f6916b6ae2c05a499675ff54480256ece Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Fri, 11 Sep 2015 19:40:33 +0200 Subject: more towards views --- pcilib/pci.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pcilib/pci.h') diff --git a/pcilib/pci.h b/pcilib/pci.h index 657c335..3b1c0e8 100644 --- a/pcilib/pci.h +++ b/pcilib/pci.h @@ -8,6 +8,7 @@ #define PCILIB_DMA_SKIP_TIMEOUT 1000000 /**< us */ #define PCILIB_MAX_BARS 6 /**< this is defined by PCI specification */ #define PCILIB_DEFAULT_REGISTER_SPACE 1024 /**< number of registers to allocate on init */ +#define PCILIB_DEFAULT_VIEW_SPACE 128 /**< number of views to allocate on init */ #define PCILIB_MAX_REGISTER_BANKS 32 /**< maximum number of register banks to allocate space for */ #define PCILIB_MAX_REGISTER_RANGES 32 /**< maximum number of register ranges to allocate space for */ #define PCILIB_MAX_REGISTER_PROTOCOLS 32 /**< maximum number of register protocols to support */ -- cgit v1.2.3 From 2dfb23016c39a331bf5ed4111b630dffa330edbb Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Mon, 14 Sep 2015 11:56:38 +0200 Subject: views working fine, units in progress --- pcilib/pci.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pcilib/pci.h') diff --git a/pcilib/pci.h b/pcilib/pci.h index 3b1c0e8..a62e1cc 100644 --- a/pcilib/pci.h +++ b/pcilib/pci.h @@ -9,6 +9,7 @@ #define PCILIB_MAX_BARS 6 /**< this is defined by PCI specification */ #define PCILIB_DEFAULT_REGISTER_SPACE 1024 /**< number of registers to allocate on init */ #define PCILIB_DEFAULT_VIEW_SPACE 128 /**< number of views to allocate on init */ +#define PCILIB_DEFAULT_UNIT_SPACE 128 /** number of units to allocate on init*/ #define PCILIB_MAX_REGISTER_BANKS 32 /**< maximum number of register banks to allocate space for */ #define PCILIB_MAX_REGISTER_RANGES 32 /**< maximum number of register ranges to allocate space for */ #define PCILIB_MAX_REGISTER_PROTOCOLS 32 /**< maximum number of register protocols to support */ @@ -27,6 +28,7 @@ #include "export.h" #include "locking.h" #include "xml.h" +#include "unit.h" typedef struct { uint8_t max_link_speed, link_speed; @@ -65,7 +67,7 @@ struct pcilib_s { size_t dyn_banks; /**< Number of configured dynamic banks */ size_t num_enum_views,alloc_enum_views; /**< Number of configured and allocated views of type enum*/ size_t num_formula_views,alloc_formula_views; /**< Number of configured and allocated views of type formula*/ - + size_t num_units,alloc_units; /**< Number of configured and allocated units*/ pcilib_register_description_t *registers; /**< List of currently defined registers (from all sources) */ pcilib_register_bank_description_t banks[PCILIB_MAX_REGISTER_BANKS + 1]; /**< List of currently defined register banks (from all sources) */ pcilib_register_range_t ranges[PCILIB_MAX_REGISTER_RANGES + 1]; /**< List of currently defined register ranges (from all sources) */ @@ -87,6 +89,7 @@ struct pcilib_s { pcilib_view_enum2_t* enum_views; /**< list of currently defined views of type enum*/ pcilib_view_formula_t* formula_views; /**< list of currently defined views of type formula*/ + pcilib_unit_t* units; /** list of currently defined units*/ #ifdef PCILIB_FILE_IO int file_io_handle; #endif /* PCILIB_FILE_IO */ -- cgit v1.2.3 From de589562bd91cc60ee3e2d739bdd7a03063d38f7 Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Mon, 14 Sep 2015 18:18:00 +0200 Subject: first try with pcilib_operation_t --- pcilib/pci.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pcilib/pci.h') diff --git a/pcilib/pci.h b/pcilib/pci.h index a62e1cc..d5f1811 100644 --- a/pcilib/pci.h +++ b/pcilib/pci.h @@ -67,6 +67,7 @@ struct pcilib_s { size_t dyn_banks; /**< Number of configured dynamic banks */ size_t num_enum_views,alloc_enum_views; /**< Number of configured and allocated views of type enum*/ size_t num_formula_views,alloc_formula_views; /**< Number of configured and allocated views of type formula*/ + size_t num_views,alloc_views; /**< Number of configured and allocated views*/ size_t num_units,alloc_units; /**< Number of configured and allocated units*/ pcilib_register_description_t *registers; /**< List of currently defined registers (from all sources) */ pcilib_register_bank_description_t banks[PCILIB_MAX_REGISTER_BANKS + 1]; /**< List of currently defined register banks (from all sources) */ @@ -86,9 +87,9 @@ struct pcilib_s { struct pcilib_locking_s locks; /**< Context of locking subsystem */ struct pcilib_xml_s xml; /**< XML context */ - pcilib_view_enum2_t* enum_views; /**< list of currently defined views of type enum*/ - pcilib_view_formula_t* formula_views; /**< list of currently defined views of type formula*/ - + pcilib_view_enum2_t* enum_views; /**< list of currently defined views of type enum*/ + pcilib_view_formula_t* formula_views; /**< list of currently defined views of type formula*/ + pcilib_view_t* views; /**< list of currently defined views*/ pcilib_unit_t* units; /** list of currently defined units*/ #ifdef PCILIB_FILE_IO int file_io_handle; -- cgit v1.2.3 From 6c47064466d8484813741f347e41af1d4ac90f85 Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Tue, 15 Sep 2015 11:45:37 +0200 Subject: cleaning --- pcilib/pci.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pcilib/pci.h') diff --git a/pcilib/pci.h b/pcilib/pci.h index d5f1811..8805fc2 100644 --- a/pcilib/pci.h +++ b/pcilib/pci.h @@ -65,8 +65,6 @@ struct pcilib_s { size_t num_banks, num_protocols, num_ranges; /**< Number of registered banks, protocols, and register ranges */ size_t num_engines; /**< Number of configured DMA engines */ size_t dyn_banks; /**< Number of configured dynamic banks */ - size_t num_enum_views,alloc_enum_views; /**< Number of configured and allocated views of type enum*/ - size_t num_formula_views,alloc_formula_views; /**< Number of configured and allocated views of type formula*/ size_t num_views,alloc_views; /**< Number of configured and allocated views*/ size_t num_units,alloc_units; /**< Number of configured and allocated units*/ pcilib_register_description_t *registers; /**< List of currently defined registers (from all sources) */ @@ -87,10 +85,9 @@ struct pcilib_s { struct pcilib_locking_s locks; /**< Context of locking subsystem */ struct pcilib_xml_s xml; /**< XML context */ - pcilib_view_enum2_t* enum_views; /**< list of currently defined views of type enum*/ - pcilib_view_formula_t* formula_views; /**< list of currently defined views of type formula*/ pcilib_view_t* views; /**< list of currently defined views*/ pcilib_unit_t* units; /** list of currently defined units*/ + #ifdef PCILIB_FILE_IO int file_io_handle; #endif /* PCILIB_FILE_IO */ -- cgit v1.2.3 From 33db9c07bd08fae74c145c547f1b0e9f55ab25ae Mon Sep 17 00:00:00 2001 From: "nicolas.zilio@hotmail.fr" <> Date: Tue, 15 Sep 2015 12:07:04 +0200 Subject: merge views and units, some name homogeneisation --- pcilib/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pcilib/pci.h') diff --git a/pcilib/pci.h b/pcilib/pci.h index 8805fc2..f364890 100644 --- a/pcilib/pci.h +++ b/pcilib/pci.h @@ -28,7 +28,7 @@ #include "export.h" #include "locking.h" #include "xml.h" -#include "unit.h" +#include "views.h" typedef struct { uint8_t max_link_speed, link_speed; -- cgit v1.2.3