Files
edgetx-gx12/radio/util/hw_defs/hal_keys.jinja
T
cc17046e7a feat: Flysky PL18 Support (#4105)
Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
Co-authored-by: rotorman <risto.koiva@web.de>
Co-authored-by: Xy201207 <yaoxu@flysky.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-12-06 09:00:44 +10:00

30 lines
733 B
Django/Jinja

//
// WARNING: DO NOT EDIT THIS FILE
// This file has been generated from the target's JSON hardware description
//
const char* const _key_labels[] = {
{% for k in key_index %}
{% set key = keys | selectattr("key","==",k) | first %}
{% if key %}
"{{ key.label }}",
{% else %}
nullptr,
{% endif %}
{% endfor %}
};
constexpr uint32_t _defined_keys = 0
{% for key in keys %}
| (1 << {{ key.key }})
{% endfor %}
;
constexpr uint8_t _n_keys = {{ keys | length }};
constexpr uint8_t _n_trims = {{ trims | length }};
static_assert(DIM(_key_labels) == MAX_KEYS, "wrong size _key_labels[]");
static_assert(_n_keys <= MAX_KEYS, "too many keys defined");
static_assert(_n_trims <= MAX_TRIMS, "too many trims defined");