blob: 069e5f082f3982d0030e6e65ab01339face26a3d [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
Patrick Williams2c4fbc42020-06-26 15:33:11 -050013const DeviceMap UCD90160::deviceMap
14{
Brandon Wymanf99887b2019-04-05 17:37:14 -050015%for ucd_data in ucd90160s:
16 {${ucd_data['index']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050017 DeviceDefinition{
Brandon Wymanee21fd22019-04-11 15:46:45 -050018 "${ucd_data['path']}",
Matt Spinlere7e432b2017-08-21 15:01:40 -050019
Brandon Wymanee21fd22019-04-11 15:46:45 -050020 RailNames{
21 %for rail in ucd_data['RailNames']:
22 "${rail}"s,
23 %endfor
24 },
Matt Spinlerd998b732017-08-21 15:35:54 -050025
Brandon Wyman2ca8e482019-04-11 16:33:14 -050026 GPIConfigs{
27 %for gpi_config in ucd_data['GPIConfigs']:
28 <%
29 poll = str(gpi_config['poll']).lower()
30 %>\
31 GPIConfig{${gpi_config['gpi']}, ${gpi_config['pinID']}, "${gpi_config['name']}"s, ${poll}, extraAnalysisType::${gpi_config['analysis']}},
32 %endfor
33 },
Matt Spinler2d248ae2017-09-19 11:06:48 -050034
Brandon Wyman573f8872019-04-11 17:24:04 -050035 GPIOAnalysis{
36 %for gpio_analysis in ucd_data['GPIOAnalysis']:
37 {extraAnalysisType::${gpio_analysis['type']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050038 GPIOGroup{
Brandon Wyman573f8872019-04-11 17:24:04 -050039 "${gpio_analysis['path']}",
40 gpio::Value::${gpio_analysis['gpio_value']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050041 [](auto& ucd, const auto& callout) {
Patrick Williams2c4fbc42020-06-26 15:33:11 -050042 ucd.${gpio_analysis['error_function']}(callout);
Matt Spinlerf0f02b92018-10-25 16:12:43 -050043 },
Brandon Wyman573f8872019-04-11 17:24:04 -050044 optionFlags::${gpio_analysis['option_flags']},
Matt Spinlerf0f02b92018-10-25 16:12:43 -050045 GPIODefinitions{
Brandon Wyman573f8872019-04-11 17:24:04 -050046 %for gpio_defs in gpio_analysis['GPIODefinitions']:
47 GPIODefinition{${gpio_defs['gpio']}, "${gpio_defs['callout']}"s},
48 %endfor
49 }
50 }
51 },
52 %endfor
53 }
54 }
Brandon Wymanf99887b2019-04-05 17:37:14 -050055 },
56%endfor
57};
Matt Spinlerb54357f2017-08-21 14:38:54 -050058
Matt Spinlerf0f02b92018-10-25 16:12:43 -050059} // namespace power
60} // namespace witherspoon