blob: 407fa5d2a4d8b63e397eddd4f8ffe8208085e248 [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_CONFIG_EC_CONFIG_H_
#define CHROMEOS_CONFIG_EC_CONFIG_H_
#include <stdint.h>
#include <stdlib.h>
{% for hwprop in enum_to_elements_map -%}
{% set elems = [] -%}
{% set namespace = hwprop | upper -%}
{% for elem, i in (enum_to_elements_map[hwprop]).items() -%}
{{ elems.append([namespace, '_', elem | string | upper, ' = ', i | string] | join) | default("", True) }}
{%- if loop.last %}
enum {{ hwprop ~ '_type' }} {
{{ (elems | join(',\n ')) }}
};
{% endif -%}
{%- endfor -%}
{% endfor -%}
struct sku_info {
const uint8_t sku;
{%- for hwprop in hwprops %}
const uint8_t {{ hwprop }} :{{ hwprop_values_count[hwprop] }};
{%- endfor %}
};
extern const size_t NUM_SKUS;
extern const struct sku_info ALL_SKUS[];
#endif // CHROMEOS_CONFIG_EC_CONFIG_H_