summaryrefslogtreecommitdiff
path: root/rcc/rcc_enums.h.j2
blob: 1d8bed8ab273747e45ee76434968205f3c9094ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#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 %}
}