1 /* This is a generated file. */
2 
3 #include "ucd90160.hpp"
4 
5 namespace phosphor
6 {
7 namespace power
8 {
9 
10 using namespace ucd90160;
11 using namespace std::string_literals;
12 
13 const DeviceMap UCD90160::deviceMap{
14 %for ucd_data in ucd90160s:
15     {${ucd_data['index']},
16      DeviceDefinition{
17        "${ucd_data['path']}",
18 
19         RailNames{
20         %for rail in ucd_data['RailNames']:
21             "${rail}"s,
22         %endfor
23         },
24 
25         GPIConfigs{
26         %for gpi_config in ucd_data['GPIConfigs']:
27         <%
28             poll = str(gpi_config['poll']).lower()
29         %>\
30             GPIConfig{${gpi_config['gpi']}, ${gpi_config['pinID']}, "${gpi_config['name']}"s, ${poll}, extraAnalysisType::${gpi_config['analysis']}},
31         %endfor
32         },
33 
34         GPIOAnalysis{
35         %for gpio_analysis in ucd_data.get('GPIOAnalysis', []):
36              {extraAnalysisType::${gpio_analysis['type']},
37               GPIOGroup{
38                   "${gpio_analysis['path']}",
39                   gpio::Value::${gpio_analysis['gpio_value']},
40                   [](auto& ucd, const auto& callout) {
41                       ucd.${gpio_analysis['error_function']}(callout);
42                   },
43                   optionFlags::${gpio_analysis['option_flags']},
44                   GPIODefinitions{
45                   %for gpio_defs in gpio_analysis['GPIODefinitions']:
46                       GPIODefinition{${gpio_defs['gpio']}, "${gpio_defs['callout']}"s},
47                   %endfor
48                   }
49               }
50              },
51         %endfor
52         }
53      }
54     },
55 %endfor
56 };
57 
58 } // namespace power
59 } // namespace phosphor
60