Xenomai  3.1
calibration.h
Go to the documentation of this file.
1 
22 #ifndef __ANALOGY_CALIBRATION_H__
23 #define __ANALOGY_CALIBRATION_H__
24 
25 /*
26  * internal definitions between the xenomai utils and the library.
27  * no need to expose them to the USER
28  *
29  */
30 #define ELEMENT_FIELD_FMT "%s_%d:%s"
31 #define ELEMENT_FMT "%s:%s"
32 #define COEFF_FMT ELEMENT_FIELD_FMT"_%d"
33 
34 #define PLATFORM_STR "platform"
35 #define CALIBRATION_SUBD_STR "calibration"
36 #define MEMORY_SUBD_STR "memory"
37 #define AI_SUBD_STR "analog_input"
38 #define AO_SUBD_STR "analog_output"
39 
40 #define INDEX_STR "index"
41 #define ELEMENTS_STR "elements"
42 #define CHANNEL_STR "channel"
43 #define RANGE_STR "range"
44 #define EXPANSION_STR "expansion_origin"
45 #define NBCOEFF_STR "nbcoeff"
46 #define COEFF_STR "coeff"
47 #define BOARD_STR "board_name"
48 #define DRIVER_STR "driver_name"
49 
50 struct polynomial {
51  double expansion_origin;
52  double *coefficients;
53  int nb_coefficients;
54  int order;
55 };
56 
57 struct subdevice_calibration_node {
58  struct holder node;
59  struct polynomial *polynomial;
60  unsigned channel;
61  unsigned range;
62 };
63 
64 void write_calibration_file(FILE *dst, struct listobj *l,
65  struct a4l_calibration_subdev *subd,
66  a4l_desc_t *desc);
67 
68 #endif
Structure containing device-information useful to users.
Definition: analogy.h:62