summaryrefslogtreecommitdiff
path: root/rcc/rcc_enums.h.j2
blob: 1b0abd0b72910ad0117e71bbe82615a740433945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This file is auto-generated from a template!
// You should reconsider editing!
#pragma once

namespace rcc {
    {% for bus, devices in buses.items() %}
        enum {{ bus }}_dev {
            {% for num, name in devices.items() %}
                {{ name }} = 1 << {{ num }},
            {% endfor %}
        };

        template <typename T>
        void enable(const T& rcc, {{ bus }}_dev dev) {
            rcc->{{ bus }}ENR |= dev;
        }

    {% endfor %}
}