blob: 1775158ff898ff6abfdd5d1e458bd0649269212b [file] [log] [blame]
Brandon Wyman34e257b2019-03-28 17:39:18 -05001/* This is a generated file. */
Matt Spinlerb54357f2017-08-21 14:38:54 -05002
Brandon Wyman34e257b2019-03-28 17:39:18 -05003#include "ucd90160.hpp"
Matt Spinlerb54357f2017-08-21 14:38:54 -05004
5namespace witherspoon
6{
7namespace power
8{
9
10using namespace ucd90160;
11using namespace std::string_literals;
12
Matt Spinlerf0f02b92018-10-25 16:12:43 -050013const DeviceMap UCD90160::deviceMap{
Brandon Wymanf99887b2019-04-05 17:37:14 -050014%for ucd_data in ucd90160s:
15 {${ucd_data['index']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050016 DeviceDefinition{
Brandon Wymanee21fd22019-04-11 15:46:45 -050017 "${ucd_data['path']}",
Matt Spinlere7e432b2017-08-21 15:01:40 -050018
Brandon Wymanee21fd22019-04-11 15:46:45 -050019 RailNames{
20 %for rail in ucd_data['RailNames']:
21 "${rail}"s,
22 %endfor
23 },
Matt Spinlerd998b732017-08-21 15:35:54 -050024
Brandon Wyman2ca8e482019-04-11 16:33:14 -050025 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 },
Matt Spinler2d248ae2017-09-19 11:06:48 -050033
Brandon Wyman573f8872019-04-11 17:24:04 -050034 GPIOAnalysis{
35 %for gpio_analysis in ucd_data['GPIOAnalysis']:
36 {extraAnalysisType::${gpio_analysis['type']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050037 GPIOGroup{
Brandon Wyman573f8872019-04-11 17:24:04 -050038 "${gpio_analysis['path']}",
39 gpio::Value::${gpio_analysis['gpio_value']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050040 [](auto& ucd, const auto& callout) {
Brandon Wyman573f8872019-04-11 17:24:04 -050041 ucd.${gpio_analysis['error_function']}(callout);
Matt Spinlerf0f02b92018-10-25 16:12:43 -050042 },
Brandon Wyman573f8872019-04-11 17:24:04 -050043 optionFlags::${gpio_analysis['option_flags']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050044 GPIODefinitions{
Brandon Wyman573f8872019-04-11 17:24:04 -050045 %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 }
Brandon Wymanf99887b2019-04-05 17:37:14 -050054 },
55%endfor
56};
Matt Spinlerb54357f2017-08-21 14:38:54 -050057
Matt Spinlerf0f02b92018-10-25 16:12:43 -050058} // namespace power
59} // namespace witherspoon