/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/pcilib.h

  • Committer: Suren A. Chilingaryan
  • Date: 2016-02-23 06:20:33 UTC
  • mfrom: (346.1.18 pcitool)
  • Revision ID: csa@suren.me-20160223062033-mz8qkpm1a2oioveb
Merge Python scripting support from Vasiliy Chernov

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
typedef enum {
44
44
    PCILIB_ACCESS_R = 1,                        /**< getting property is allowed */
45
45
    PCILIB_ACCESS_W = 2,                        /**< setting property is allowed */
46
 
    PCILIB_ACCESS_RW = 3
 
46
    PCILIB_ACCESS_RW = 3,
 
47
    PCILIB_ACCESS_INCONSISTENT = 0x10000        /**< inconsistent access, one will not read that one has written */
47
48
} pcilib_access_mode_t;
48
49
 
49
50
typedef enum {
54
55
    PCILIB_REGISTER_RW1C = 5,
55
56
    PCILIB_REGISTER_W1I = 8,                    /**< writting 1 inversts the bit, writting 0 keeps the value */
56
57
    PCILIB_REGISTER_RW1I = 9,
 
58
    PCILIB_REGISTER_INCONSISTENT = 0x10000      /**< inconsistent register, writting and reading does not match */
57
59
} pcilib_register_mode_t;
58
60
 
59
61
typedef enum {
1256
1258
int pcilib_set_value_from_static_string(pcilib_t *ctx, pcilib_value_t *val, const char *str);
1257
1259
 
1258
1260
/**
 
1261
 * Initializes the polymorphic value from the string. The string is copied.
 
1262
 * If `val` already contains the value, cleans it first. Therefore, before first usage the value should be always initialized to 0.
 
1263
 * @param[in] ctx       - pcilib context
 
1264
 * @param[in,out] val   - initialized polymorphic value
 
1265
 * @param[in] str       - initializer
 
1266
 * @return              - 0 on success or memory error
 
1267
 */
 
1268
int pcilib_set_value_from_string(pcilib_t *ctx, pcilib_value_t *value, const char *str);
 
1269
 
 
1270
/**
1259
1271
 * Get the floating point value from the polymorphic type. May inmply impliced type conversion,
1260
1272
 * for isntance parsing the number from the string. Will return 0. and report an error if
1261
1273
 * conversion failed.