/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/property.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-10-19 13:58:46 UTC
  • Revision ID: csa@suren.me-20151019135846-nz3f6iobifx06xvq
Support computed (property-based) registers

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
extern "C" {
6
6
#endif
7
7
/**
8
 
 * This is internal function used to add property view for all model registers. It is automatically
 
8
 * This is an internal function used to add property view for all model registers. It is automatically
9
9
 * called from pcilib_add_registers and should not be called by the users. On error no new views are 
10
10
 * initalized.
11
11
 * @param[in,out] ctx - pcilib context
14
14
 * @param[in] desc - register descriptions
15
15
 * @return - error or 0 on success
16
16
 */
17
 
int pcilib_add_register_properties(pcilib_t *ctx, size_t n, const pcilib_register_bank_t *banks, const pcilib_register_description_t *desc);
 
17
int pcilib_add_properties_from_registers(pcilib_t *ctx, size_t n, const pcilib_register_bank_t *banks, const pcilib_register_description_t *registers);
 
18
 
 
19
 
 
20
/**
 
21
 * To reduce number of required interfaces, some of the property views may be also mapped into the 
 
22
 * model as registers. The client application, then, is able to use either register or property APIs
 
23
 * to access them. This is an internal function which processes the supplied views, finds which views
 
24
 * have to be mapped in the register space, and finally pushes corresponding registers into the model.
 
25
 * The function is automatically called from pcilib_add_views and should never be called by the user. 
 
26
 * On error no new registers are added.
 
27
 * @param[in,out] ctx - pcilib context
 
28
 * @param[in] n - number of views to analyze. 
 
29
 * @param[in] view_ctx - views to analyze
 
30
 * @param[in] view - array of pointers to corresponding view descriptions
 
31
 * @return - error or 0 on success
 
32
 */
 
33
int pcilib_add_registers_from_properties(pcilib_t *ctx, size_t n, pcilib_view_context_t* const *view_ctx, pcilib_view_description_t* const *view);
18
34
 
19
35
#ifdef __cplusplus
20
36
}