Brandon Wyman | 34e257b | 2019-03-28 17:39:18 -0500 | [diff] [blame] | 1 | /* This is a generated file. */ |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 2 | |
Brandon Wyman | 34e257b | 2019-03-28 17:39:18 -0500 | [diff] [blame] | 3 | #include "ucd90160.hpp" |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 4 | |
| 5 | namespace witherspoon |
| 6 | { |
| 7 | namespace power |
| 8 | { |
| 9 | |
| 10 | using namespace ucd90160; |
| 11 | using namespace std::string_literals; |
| 12 | |
Patrick Williams | 2c4fbc4 | 2020-06-26 15:33:11 -0500 | [diff] [blame^] | 13 | const DeviceMap UCD90160::deviceMap |
| 14 | { |
Brandon Wyman | f99887b | 2019-04-05 17:37:14 -0500 | [diff] [blame] | 15 | %for ucd_data in ucd90160s: |
| 16 | {${ucd_data['index']}, |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 17 | DeviceDefinition{ |
Brandon Wyman | ee21fd2 | 2019-04-11 15:46:45 -0500 | [diff] [blame] | 18 | "${ucd_data['path']}", |
Matt Spinler | e7e432b | 2017-08-21 15:01:40 -0500 | [diff] [blame] | 19 | |
Brandon Wyman | ee21fd2 | 2019-04-11 15:46:45 -0500 | [diff] [blame] | 20 | RailNames{ |
| 21 | %for rail in ucd_data['RailNames']: |
| 22 | "${rail}"s, |
| 23 | %endfor |
| 24 | }, |
Matt Spinler | d998b73 | 2017-08-21 15:35:54 -0500 | [diff] [blame] | 25 | |
Brandon Wyman | 2ca8e48 | 2019-04-11 16:33:14 -0500 | [diff] [blame] | 26 | 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 Spinler | 2d248ae | 2017-09-19 11:06:48 -0500 | [diff] [blame] | 34 | |
Brandon Wyman | 573f887 | 2019-04-11 17:24:04 -0500 | [diff] [blame] | 35 | GPIOAnalysis{ |
| 36 | %for gpio_analysis in ucd_data['GPIOAnalysis']: |
| 37 | {extraAnalysisType::${gpio_analysis['type']}, |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 38 | GPIOGroup{ |
Brandon Wyman | 573f887 | 2019-04-11 17:24:04 -0500 | [diff] [blame] | 39 | "${gpio_analysis['path']}", |
| 40 | gpio::Value::${gpio_analysis['gpio_value']}, |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 41 | [](auto& ucd, const auto& callout) { |
Patrick Williams | 2c4fbc4 | 2020-06-26 15:33:11 -0500 | [diff] [blame^] | 42 | ucd.${gpio_analysis['error_function']}(callout); |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 43 | }, |
Brandon Wyman | 573f887 | 2019-04-11 17:24:04 -0500 | [diff] [blame] | 44 | optionFlags::${gpio_analysis['option_flags']}, |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 45 | GPIODefinitions{ |
Brandon Wyman | 573f887 | 2019-04-11 17:24:04 -0500 | [diff] [blame] | 46 | %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 Wyman | f99887b | 2019-04-05 17:37:14 -0500 | [diff] [blame] | 55 | }, |
| 56 | %endfor |
| 57 | }; |
Matt Spinler | b54357f | 2017-08-21 14:38:54 -0500 | [diff] [blame] | 58 | |
Matt Spinler | f0f02b9 | 2018-10-25 16:12:43 -0500 | [diff] [blame] | 59 | } // namespace power |
| 60 | } // namespace witherspoon |