]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/drivers/mss_ace/mss_ace_configurator.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / CORTEX_A2F200_IAR_and_Keil / MicroSemi_Code / drivers / mss_ace / mss_ace_configurator.h
1 /*******************************************************************************\r
2  * (c) Copyright 2009 Actel Corporation.  All rights reserved.\r
3  * \r
4  * SVN $Revision: 2841 $\r
5  * SVN $Date: 2010-07-20 18:10:00 +0100 (Tue, 20 Jul 2010) $\r
6  */\r
7 \r
8 /*=========================================================================*//**\r
9   @mainpage ACE Configurator data provided to ACE Driver.\r
10 \r
11   @section intro_sec Introduction\r
12   This file contains the definition of data structures used by the ACE\r
13   Configurator software tool for sharing information about the ACE configuration\r
14   with the ACE driver. It also contains the API for accessor functions used by\r
15   the ACE driver to extract relevant information from these data structures.\r
16  *//*=========================================================================*/\r
17 #ifndef __MSS_ACE_CONFIGURATOR_H_\r
18 #define __MSS_ACE_CONFIGURATOR_H_\r
19 \r
20 #include "mss_ace.h"\r
21 \r
22 #ifdef __cplusplus\r
23 extern "C" {\r
24 #endif \r
25 \r
26 /*-------------------------------------------------------------------------*//**\r
27   Post Processing Engine (PPE) flags IDs.\r
28  */\r
29 typedef enum\r
30 {\r
31     PPE_FLAGS0_0 = 0,\r
32     PPE_FLAGS0_1 = 1,\r
33     PPE_FLAGS0_2 = 2,\r
34     PPE_FLAGS0_3 = 3,\r
35     PPE_FLAGS0_4 = 4,\r
36     PPE_FLAGS0_5 = 5,\r
37     PPE_FLAGS0_6 = 6,\r
38     PPE_FLAGS0_7 = 7,\r
39     PPE_FLAGS0_8 = 8,\r
40     PPE_FLAGS0_9 = 9,\r
41     PPE_FLAGS0_10 = 10,\r
42     PPE_FLAGS0_11 = 11,\r
43     PPE_FLAGS0_12 = 12,\r
44     PPE_FLAGS0_13 = 13,\r
45     PPE_FLAGS0_14 = 14,\r
46     PPE_FLAGS0_15 = 15,\r
47     PPE_FLAGS0_16 = 16,\r
48     PPE_FLAGS0_17 = 17,\r
49     PPE_FLAGS0_18 = 18,\r
50     PPE_FLAGS0_19 = 19,\r
51     PPE_FLAGS0_20 = 20,\r
52     PPE_FLAGS0_21 = 21,\r
53     PPE_FLAGS0_22 = 22,\r
54     PPE_FLAGS0_23 = 23,\r
55     PPE_FLAGS0_24 = 24,\r
56     PPE_FLAGS0_25 = 25,\r
57     PPE_FLAGS0_26 = 26,\r
58     PPE_FLAGS0_27 = 27,\r
59     PPE_FLAGS0_28 = 28,\r
60     PPE_FLAGS0_29 = 29,\r
61     PPE_FLAGS0_30 = 30,\r
62     PPE_FLAGS0_31 = 31,\r
63     PPE_FLAGS1_0 = 32,\r
64     PPE_FLAGS1_1 = 33,\r
65     PPE_FLAGS1_2 = 34,\r
66     PPE_FLAGS1_3 = 35,\r
67     PPE_FLAGS1_4 = 36,\r
68     PPE_FLAGS1_5 = 37,\r
69     PPE_FLAGS1_6 = 38,\r
70     PPE_FLAGS1_7 = 39,\r
71     PPE_FLAGS1_8 = 40,\r
72     PPE_FLAGS1_9 = 41,\r
73     PPE_FLAGS1_10 = 42,\r
74     PPE_FLAGS1_11 = 43,\r
75     PPE_FLAGS1_12 = 44,\r
76     PPE_FLAGS1_13 = 45,\r
77     PPE_FLAGS1_14 = 46,\r
78     PPE_FLAGS1_15 = 47,\r
79     PPE_FLAGS1_16 = 48,\r
80     PPE_FLAGS1_17 = 49,\r
81     PPE_FLAGS1_18 = 50,\r
82     PPE_FLAGS1_19 = 51,\r
83     PPE_FLAGS1_20 = 52,\r
84     PPE_FLAGS1_21 = 53,\r
85     PPE_FLAGS1_22 = 54,\r
86     PPE_FLAGS1_23 = 55,\r
87     PPE_FLAGS1_24 = 56,\r
88     PPE_FLAGS1_25 = 57,\r
89     PPE_FLAGS1_26 = 58,\r
90     PPE_FLAGS1_27 = 59,\r
91     PPE_FLAGS1_28 = 60,\r
92     PPE_FLAGS1_29 = 61,\r
93     PPE_FLAGS1_30 = 62,\r
94     PPE_FLAGS1_31 = 63,\r
95     PPE_FLAGS2_0 = 64,\r
96     PPE_FLAGS2_1 = 65,\r
97     PPE_FLAGS2_2 = 66,\r
98     PPE_FLAGS2_3 = 67,\r
99     PPE_FLAGS2_4 = 68,\r
100     PPE_FLAGS2_5 = 69,\r
101     PPE_FLAGS2_6 = 70,\r
102     PPE_FLAGS2_7 = 71,\r
103     PPE_FLAGS2_8 = 72,\r
104     PPE_FLAGS2_9 = 73,\r
105     PPE_FLAGS2_10 = 74,\r
106     PPE_FLAGS2_11 = 75,\r
107     PPE_FLAGS2_12 = 76,\r
108     PPE_FLAGS2_13 = 77,\r
109     PPE_FLAGS2_14 = 78,\r
110     PPE_FLAGS2_15 = 79,\r
111     PPE_FLAGS2_16 = 80,\r
112     PPE_FLAGS2_17 = 81,\r
113     PPE_FLAGS2_18 = 82,\r
114     PPE_FLAGS2_19 = 83,\r
115     PPE_FLAGS2_20 = 84,\r
116     PPE_FLAGS2_21 = 85,\r
117     PPE_FLAGS2_22 = 86,\r
118     PPE_FLAGS2_23 = 87,\r
119     PPE_FLAGS2_24 = 88,\r
120     PPE_FLAGS2_25 = 89,\r
121     PPE_FLAGS2_26 = 90,\r
122     PPE_FLAGS2_27 = 91,\r
123     PPE_FLAGS2_28 = 92,\r
124     PPE_FLAGS2_29 = 93,\r
125     PPE_FLAGS2_30 = 94,\r
126     PPE_FLAGS2_31 = 95,\r
127     PPE_FLAGS3_0 = 96,\r
128     PPE_FLAGS3_1 = 97,\r
129     PPE_FLAGS3_2 = 98,\r
130     PPE_FLAGS3_3 = 99,\r
131     PPE_FLAGS3_4 = 100,\r
132     PPE_FLAGS3_5 = 101,\r
133     PPE_FLAGS3_6 = 102,\r
134     PPE_FLAGS3_7 = 103,\r
135     PPE_FLAGS3_8 = 104,\r
136     PPE_FLAGS3_9 = 105,\r
137     PPE_FLAGS3_10 = 106,\r
138     PPE_FLAGS3_11 = 107,\r
139     PPE_FLAGS3_12 = 108,\r
140     PPE_FLAGS3_13 = 109,\r
141     PPE_FLAGS3_14 = 110,\r
142     PPE_FLAGS3_15 = 111,\r
143     PPE_FLAGS3_16 = 112,\r
144     PPE_FLAGS3_17 = 113,\r
145     PPE_FLAGS3_18 = 114,\r
146     PPE_FLAGS3_19 = 115,\r
147     PPE_FLAGS3_20 = 116,\r
148     PPE_FLAGS3_21 = 117,\r
149     PPE_FLAGS3_22 = 118,\r
150     PPE_FLAGS3_23 = 119,\r
151     PPE_FLAGS3_24 = 120,\r
152     PPE_FLAGS3_25 = 121,\r
153     PPE_FLAGS3_26 = 122,\r
154     PPE_FLAGS3_27 = 123,\r
155     PPE_FLAGS3_28 = 124,\r
156     PPE_FLAGS3_29 = 125,\r
157     PPE_FLAGS3_30 = 126,\r
158     PPE_FLAGS3_31 = 127,\r
159     PPE_SFFLAGS_0 = 128,\r
160     PPE_SFFLAGS_1 = 129,\r
161     PPE_SFFLAGS_2 = 130,\r
162     PPE_SFFLAGS_3 = 131,\r
163     PPE_SFFLAGS_4 = 132,\r
164     PPE_SFFLAGS_5 = 133,\r
165     PPE_SFFLAGS_6 = 134,\r
166     PPE_SFFLAGS_7 = 135,\r
167     PPE_SFFLAGS_8 = 136,\r
168     PPE_SFFLAGS_9 = 137,\r
169     PPE_SFFLAGS_10 = 138,\r
170     PPE_SFFLAGS_11 = 139,\r
171     PPE_SFFLAGS_12 = 140,\r
172     PPE_SFFLAGS_13 = 141,\r
173     PPE_SFFLAGS_14 = 142,\r
174     PPE_SFFLAGS_15 = 143,\r
175     PPE_SFFLAGS_16 = 144,\r
176     PPE_SFFLAGS_17 = 145,\r
177     PPE_SFFLAGS_18 = 146,\r
178     PPE_SFFLAGS_19 = 147,\r
179     PPE_SFFLAGS_20 = 148,\r
180     PPE_SFFLAGS_21 = 149,\r
181     PPE_SFFLAGS_22 = 150,\r
182     PPE_SFFLAGS_23 = 151,\r
183     PPE_SFFLAGS_24 = 152,\r
184     PPE_SFFLAGS_25 = 153,\r
185     PPE_SFFLAGS_26 = 154,\r
186     PPE_SFFLAGS_27 = 155,\r
187     PPE_SFFLAGS_28 = 156,\r
188     PPE_SFFLAGS_29 = 157,\r
189     PPE_SFFLAGS_30 = 158,\r
190     PPE_SFFLAGS_31 = 159,\r
191     NB_OF_PPE_FLAGS = 160\r
192 } ppe_flag_id_t;\r
193 \r
194 /*-------------------------------------------------------------------------*//**\r
195   Flag types.\r
196   The following defines are used to indicate the type of flag selected in the\r
197   ACE configurator.\r
198  */\r
199 /**\r
200   A flag configured as BASIC_THRESHOLD_OVER will be asserted when the value of\r
201   the input channel exceeds the value of the flag threshold. The flag will be\r
202   de-asserted once the value of the input channel falls back under the threshold\r
203   value. No hysteresis or state filtering is applied to the flag.\r
204  */\r
205 #define BASIC_THRESHOLD_OVER    0u\r
206 \r
207 /**\r
208   A flag configured as BASIC_THRESHOLD_UNDER will be asserted when the value of\r
209   the input channel falls under the value of the flag threshold. The flag will be\r
210   de-asserted once the value of the input channel exceeds the threshold value.\r
211   No hysteresis or state filtering is applied to the flag.\r
212  */\r
213 #define BASIC_THRESHOLD_UNDER   1u\r
214 \r
215 /**\r
216   A flag configured as STATE_FILTERED_OVER will be asserted when n consecutive\r
217   samples of the analog input are seen to exceed the value of the flag threshold,\r
218   where n is the number selected in the "assert samples" option of the ACE\r
219   configuration softwaretool flag's configuration.\r
220   The flag will be de-asserted once m consecutive samples as seen below the flag\r
221   threshold value, where m is the number selected in the "deassert samples"\r
222   option of the flag's configuration user interface.\r
223  */\r
224 #define STATE_FILTERED_OVER     2u\r
225 \r
226 /**\r
227   A flag configured as STATE_FILTERED_UNDER will be asserted when n consecutive\r
228   samples of the analog input are seen below the value of the flag threshold,\r
229   where n is the number selected in the "assert samples" option of the ACE\r
230   configuration softwaretool flag's configuration.\r
231   The flag will be de-asserted once m consecutive samples as seen to exceed the\r
232   flag threshold value, where m is the number selected in the "deassert samples"\r
233   option of the flag's configuration user interface.\r
234  */\r
235 #define STATE_FILTERED_UNDER    3u\r
236 \r
237 /**\r
238   A flag configured as DUAL_HYSTERESIS_OVER will be asserted when the value\r
239   of the input channel exceeds the threshold value plus the hysteresis value.\r
240   The flag will be deasserted when the value of the input channel falls under the\r
241   threshold value minus the hysteresis value.\r
242   */\r
243 #define DUAL_HYSTERESIS_OVER    4u\r
244 \r
245 /**\r
246   A flag configured as DUAL_HYSTERESIS_UNDER will be asserted when the value\r
247   of the input channel falls under the threshold value minus the hysteresis value.\r
248   The flag will be deasserted when the value of the input channel exceeds the\r
249   threshold value plus the hysteresis value.\r
250   */\r
251 #define DUAL_HYSTERESIS_UNDER   5u\r
252 \r
253 /**\r
254   A flag configured as IPMI_HYSTERESIS_OVER will be asserted when the value\r
255   of the input channel exceeds the threshold value. The flag will be deasserted\r
256   when the value of the input channel falls under the threshold value minus the\r
257   hysteresis value.\r
258   */\r
259 #define IPMI_HYSTERESIS_OVER    6u\r
260 \r
261 /**\r
262   A flag configured as IPMI_HYSTERESIS_UNDER will be asserted when the value\r
263   of the input channel falls under the threshold value. The flag will be\r
264   deasserted when the value of the input channel exceeds the threshold value\r
265   plus the hysteresis value.\r
266   */\r
267 #define IPMI_HYSTERESIS_UNDER   7u\r
268 \r
269 /*-------------------------------------------------------------------------*//**\r
270   State filtered flag configuration.\r
271  */\r
272 typedef struct __state_filtering_cfg\r
273 {\r
274     /**\r
275       Number of consecutive samples required for flag assertion.\r
276      */\r
277     uint8_t assert_samples;\r
278     \r
279     /**\r
280       Number of consecutive samples required for flag deassertion.\r
281      */\r
282     uint8_t deassert_samples;\r
283 } state_filtering_cfg_t;\r
284 \r
285 /*-------------------------------------------------------------------------*//**\r
286   Post Processing Engine generated flag descriptor.\r
287  */\r
288 typedef struct\r
289 {\r
290     /**\r
291       Pointer to a zero-terminated string identifying the flag described by this\r
292       structure. This unique flag name is the name selected in the ACE configurator\r
293       software tool when creating a flag.\r
294       The flag unique name contains both the name of the monitored input channel\r
295       and the name of the flag generated based the level of that input separated\r
296       by ":". For example, the unique name for the flag called "CriticalOver"\r
297       raised when the input channel called "MainSupply" reaches a critical level\r
298       would be named "MainSupply:CriticalOver".\r
299      */\r
300     const uint8_t * p_sz_flag_name;\r
301     \r
302     /**\r
303       The flag_id element identifies which PPE hardware flag will be asserted\r
304       when the flag conditions are found to be met by the Post Processing Engine.\r
305       This flag_id is typically used by the ACE driver to determine which ACE\r
306       register is used to enable, disable and clear interrupts on the associated\r
307       flag.\r
308      */\r
309     ppe_flag_id_t flag_id;\r
310     \r
311     /**\r
312       The flag_type element specifies the type of the described flag. It is\r
313       specified using one of the following:\r
314         - BASIC_THRESHOLD_OVER\r
315         - BASIC_THRESHOLD_UNDER\r
316         - STATE_FILTERED_OVER\r
317         - STATE_FILTERED_UNDER\r
318         - DUAL_HYSTERESIS_OVER\r
319         - DUAL_HYSTERESIS_UNDER\r
320         - IPMI_HYSTERESIS_OVER\r
321         - IPMI_HYSTERESIS_UNDER\r
322      */\r
323     uint8_t flag_type;\r
324     \r
325     /**\r
326       PPE RAM offset of flag threshold level.\r
327       This is the 32-bit word offset within the Post Processing Engine RAM where\r
328       the threshold associated with this flag is stored. This is used to allow\r
329       the ACE driver dynamically modifying the threshold beyond which a flag is\r
330       asserted.\r
331       In the case of hysteresis flags, threshold_ppe_offset indicates the\r
332       start location of two consecutive PPE RAM words containing the ADC value\r
333       of the hysteresis low limit followed by the ADC value for the high\r
334       hysteresis limit.\r
335      */\r
336     uint16_t threshold_ppe_offset;\r
337 \r
338     /**\r
339       The default_threshold element specifies the value of the flag's threshold\r
340       selected in the ACE Configurator. It is the ADC value for which the flag\r
341       would be raised if hysteresis was not applied.\r
342      */\r
343     uint16_t default_threshold;\r
344     \r
345     /**\r
346       The flag_properties takes a different meaning depending whether the flag is\r
347       an hysteresis flag or a state filtered flag.\r
348       \r
349       Hysteresis flags:\r
350         The flag_properties element specifies the ADC value to be applied as\r
351         hysteresis to the threshold value that was selected in the ACE Configurator.\r
352         A non-zero value indicates that an hysteresis must be applied and that\r
353         threshold_ppe_offset refers to the first of the two ADC values defining\r
354         the hysteresis applied to the input signal.\r
355       \r
356       State filtered flags:\r
357         The flag_properties element specifies the number of consecutive samples that\r
358         must be over or under the threshold value for the flag state to change.\r
359      */\r
360     uint16_t flag_properties;\r
361     \r
362     /**\r
363       The channel_handle element specifies the monitored analog input channel.\r
364       It can be used as parameter to a call to function ACE_get_ppe_sample() in\r
365       order to read the current value of the analog input channel which caused\r
366       the flag described by this structure to be raised.\r
367      */\r
368     ace_channel_handle_t channel_handle;\r
369    \r
370 } ppe_flag_desc_t;\r
371 \r
372 /*-------------------------------------------------------------------------*//**\r
373   The ace_procedure_desc_t structure is used as a procedure descriptor. It\r
374   contains all information required by the ACE driver to use and manage an ACE\r
375   procedure that was created using the ACE Configurator software tool.\r
376  */\r
377 typedef struct\r
378 {\r
379     /**\r
380       Pointer to a zero-terminated string identifying an ACE procedure.\r
381       This procedure name is the one selected when created procedures using the\r
382       ACE Configurator software tool.\r
383      */\r
384     const uint8_t * p_sz_proc_name;\r
385     \r
386     /**\r
387       Sample Sequencing Engine procedure loop start program counter value.\r
388      */\r
389     uint16_t sse_loop_pc;\r
390     \r
391     /**\r
392       Sample Sequencing Engine microcode offset.\r
393       This is the 16-bit instruction offset from which the SSE microcode for the\r
394       procedure must be loaded at into the ACE SSE RAM.\r
395       This is also the value that must be writtent into one of the ACE's SSE program\r
396       counter registers in order to start the procedure after having loaded its\r
397       microcode into SSE RAM. The actual program counter register written depends\r
398       on the analog module used by the procedure. It is determined by the value\r
399       of this structure's sse_pc_id element.\r
400      */\r
401     uint16_t sse_load_offset;\r
402     \r
403     /**\r
404       Sample Sequencing Engine microcode length.\r
405       This is the number of 16-bit SSE instructions that must be loaded into\r
406       SSE RAM in order to load the procedure into the ACE.\r
407      */\r
408     uint16_t sse_ucode_length;\r
409     \r
410     /**\r
411       Pointer to ucode.\r
412      */\r
413     const uint16_t * sse_ucode;\r
414     \r
415     /**\r
416       SSE program counter ID.\r
417       This value identifies whether the procedure is used to control analog\r
418       module 0, 1 or 2. It is used to know which SSE program counter should\r
419       be set when starting the procedure.\r
420      */\r
421     uint8_t sse_pc_id;\r
422 } ace_procedure_desc_t;\r
423 \r
424 /*-------------------------------------------------------------------------*//**\r
425   The ace_channel_desc_t structure is used as an analog input  channel\r
426   descriptor. It contains the name of a channel as selected in the ACE\r
427   Configurator software tool and the identifier used to identify the ADC channel\r
428   to which the analog input signal is connected.\r
429  */\r
430 typedef struct\r
431 {\r
432     /**\r
433       Analog input signal name as selected in the ACE Configurator software tool.\r
434      */\r
435     const uint8_t * p_sz_channel_name;\r
436     \r
437     /**\r
438       Analog block input channel connected to the input signal.\r
439      */\r
440     adc_channel_id_t signal_id;\r
441     \r
442     /**\r
443       Offset into Post Processing Engine RAM where the result of post processing\r
444       on sample for the signal will be stored.\r
445      */\r
446     uint16_t signal_ppe_offset;\r
447      \r
448     /**\r
449       Number of PPE generated flags associated with the analog input channel\r
450       described by this structure. The nb_of_flags specifies the number of items\r
451       found in the p_flags_array array.\r
452      */\r
453     uint16_t nb_of_flags;\r
454     \r
455     /**\r
456       The p_flags_array element is a pointer to an array of indexes into the\r
457       g_ppe_flags_desc_table flag descriptors table. The array it points to\r
458       lists the flags generated base don the value of the analog input channel\r
459       described by this structure.\r
460      */\r
461     const uint16_t * p_flags_array;\r
462     \r
463 } ace_channel_desc_t;\r
464 \r
465 /*-------------------------------------------------------------------------*//**\r
466   struct ace_config_desc_t\r
467   The ace_config_descr_t structure is used to provide information about the\r
468   configuration of the ACE and analog block. A single instance of this structure\r
469   is intended to be used to inform the ACE driver of the ACE configuration\r
470   seleted using the ACE Configurator software tool and programmed into the ACE\r
471   hardware at system boot time.\r
472  */\r
473 typedef struct\r
474 {\r
475     /*--------------------------------------------------------------------------\r
476      * Procedures information\r
477      */\r
478     /**\r
479       Procedure descriptors table location.\r
480       This is a pointer to an array of procedure descriptors.\r
481       @see nb_of_procedures\r
482      */\r
483     ace_procedure_desc_t * proc_descr_table;\r
484     \r
485     /**\r
486       Total number of available procedures. This indicates the number of elements\r
487       of the procedure descriptor array.\r
488       @see proc_descr_table\r
489      */\r
490     uint16_t nb_of_procedures;\r
491     \r
492     /**\r
493       Number of procedures loaded into the ACE hardware at system boot time.\r
494       @see boot_loaded_proc_idx_list\r
495      */\r
496     uint16_t nb_boot_loaded_proc;\r
497     /**\r
498       Pointer to list of procedures loaded into the ACE hardware at system boot\r
499       time. That list contains the indexes into the procedure descriptors array\r
500       of the procedures loaded into the ACE hardware.\r
501       @see nb_boot_loaded_proc\r
502      */\r
503     uint16_t * boot_loaded_proc_idx_list;\r
504     \r
505     /*--------------------------------------------------------------------------\r
506      * Analog to Digital Converter signals\r
507      */\r
508     /**\r
509       Total number of configured analog input signals.\r
510       This is the number of analog input signals that were added to the ACE\r
511       configuration using the ACE Configurator software tool. It is also the\r
512       number of elements in the signal descriptor table pointed to by this\r
513       structure's signals_descr_table field.\r
514       @see signals_descr_table\r
515      */\r
516     uint16_t nb_of_signals;\r
517     \r
518     /**\r
519       Signal descriptors table location.\r
520       This is a pointer to an array of signal descriptors describing every\r
521       configured analog input signals.\r
522       @see nb_of_signals\r
523      */\r
524     ace_channel_desc_t * signals_descr_table;\r
525     \r
526     /*--------------------------------------------------------------------------\r
527      * One Bit DACs\r
528      */\r
529     /**\r
530       One Bit DAC (OBD) names as specified in ACE configurator software tool.\r
531       This array is indexed on the analog block number. i.e. sz_obd_names[0]\r
532       contains the name used to identify the OBD contained in analog module 0.\r
533       A value of 0 in this array indicates that no name was assigned to the\r
534       associated OBD.\r
535      */\r
536     const uint8_t * sz_obd_names[3];\r
537     \r
538     /*--------------------------------------------------------------------------\r
539      * PPE generated flags\r
540      */\r
541     /**\r
542       Flag descriptors array location.\r
543       This is a pointer to an array of ppe_flag_desc_t structures describing the\r
544       properties of each of the flags generated by the Post Processing Engine.\r
545       The size of that array is specified by the nb_of_flags element of this\r
546       structure.\r
547      */\r
548     ppe_flag_desc_t * flags_descr_table;\r
549 \r
550     /**\r
551       Number of flags used in the ACE Configurator generated configuration.\r
552      */\r
553     uint8_t nb_of_flags;\r
554     \r
555     /*--------------------------------------------------------------------------\r
556      * Analog comparators\r
557      */\r
558     /**\r
559      *\r
560      */\r
561 } ace_config_desc_t;\r
562 \r
563 \r
564 /*-------------------------------------------------------------------------*//**\r
565   The ace_adc_config_t data structure is used by the ACE configurator to inform\r
566   the ACE driver of an analog to digital converter's configuration.\r
567  */\r
568 typedef struct\r
569 {\r
570     /**\r
571       ADC resolution. Values can be 256, 1024 or 4096 depending whether the ADC\r
572       is configured for 8, 10 or 12 bits.\r
573      */\r
574     uint16_t adc_resolution;\r
575     \r
576     /**\r
577       VA_REF value in milli-Volts. This should be set to 2560 if internal VAREF\r
578       is used.\r
579      */\r
580     uint16_t va_ref;\r
581     \r
582 } ace_adc_config_t;\r
583 \r
584 /*-------------------------------------------------------------------------*//**\r
585   The ppe_transforms_desc_t data structure is used by the ACE configurator to\r
586   inform the ACE driver of the location of the "m" factor and "c" offset used\r
587   by the PPE to perform a linear transform of the form y = m*x + c. This linear\r
588   transform is used to apply calibration to the ADC samples. It can also include\r
589   a user defined linear transform specified by the user using the ACE\r
590   configurator. The factor and offset of the user defined transform is included\r
591   in the default_m2 and default_c2 items. \r
592  */\r
593 typedef struct\r
594 {\r
595     /**\r
596       Offset into Post Processing Engine RAM where the linear transform m factor\r
597       is stored.\r
598      */\r
599     uint16_t    m_ppe_offset;\r
600     \r
601     /**\r
602       Offset into Post Processing Engine RAM where the linear transform c offset\r
603       is stored.\r
604      */\r
605     uint16_t    c_ppe_offset;\r
606     \r
607     /**\r
608       Default value of the user defined linear transform m2 factor.\r
609      */\r
610     int16_t     default_m2;\r
611     \r
612     /**\r
613       Default value of the user defined linear transform c2 offset.\r
614      */\r
615     int16_t     default_c2;\r
616 } ppe_transforms_desc_t;\r
617 \r
618 #ifdef __cplusplus\r
619 }\r
620 #endif\r
621 \r
622 #endif  /* __MSS_ACE_CONFIGURATOR_H_ */\r