
                    constexpr static option div32_n5 = 13;
                    constexpr static option div32_n6 = 14;
                    constexpr static option div32_n8 = 15;
                };

                // Output compare mode fields.
                struct oc1fe : mtl::hw::field<ccmr1, 2, 1> {
                    using option = mtl::hw::option<oc1fe>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };

                struct oc1pe : mtl::hw::field<ccmr1, 3, 1> {
                    using option = mtl::hw::option<oc1pe>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };

                struct oc1m : mtl::hw::field<ccmr1, 4, 3> {
                    using option = mtl::hw::option<oc1m>;
                    constexpr static option frozen = 0;
                    constexpr static option active = 1;
                    constexpr static option inactive = 2;
                    constexpr static option toggle = 3;
                    constexpr static option force_inactive = 4;
                    constexpr static option force_active = 5;
                    constexpr static option pwm1 = 6;
                    constexpr static option pwm2 = 7;
                };

                struct oc1ce : mtl::hw::field<ccmr1, 7, 1> {
                    using option = mtl::hw::option<oc1ce>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };
            };

            struct ccer : register_<0x20, uint32_t> {
                struct cc1e : mtl::hw::field<ccer, 0, 1> {
                    using option = mtl::hw::option<cc1e>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };

                struct cc1p : mtl::hw::field<ccer, 1, 1> {
                    using option = mtl::hw::option<cc1p>;
                    constexpr static option zero = 0;
                    constexpr static option one = 1;
                };

                struct cc1np : mtl::hw::field<ccer, 3, 1> {
                    using option = mtl::hw::option<cc1np>;
                    constexpr static option zero = 0;
                    constexpr static option one = 1;
                };
            };

            struct cnt : register_<0x24, uint16_t> {};
            struct psc : register_<0x28, uint16_t> {};
            struct arr : register_<0x2c, uint16_t> {};
            struct ccr1 : register_<0x34, uint16_t> {};
        };
        template <uint32_t v_base_address> struct timer_6_7 {
            constexpr static uint32_t base_address = v_base_address;
            template <uint32_t v_offset, class t_type>
            using register_ = mtl::hw::register_<base_address, v_offset, t_type>;

            struct cr1 : register_<0x00, uint32_t> {
                struct cen : mtl::hw::field<cr1, 0, 1> {
                    using option = mtl::hw::option<cen>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };

                struct udis : mtl::hw::field<cr1, 1, 1> {
                    using option = mtl::hw::option<udis>;
                    constexpr static option uev_enabled = 0;
                    constexpr static option uev_disabled = 1;
                };

                struct urs : mtl::hw::field<cr1, 2, 1> {
                    using option = mtl::hw::option<urs>;
                    constexpr static option any = 0;
                    constexpr static option counter_uo = 1;
                };

                struct opm : mtl::hw::field<cr1, 3, 1> {
                    using option = mtl::hw::option<opm>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };

                struct arpe : mtl::hw::field<cr1, 7, 1> {
                    using option = mtl::hw::option<arpe>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };
            };

            struct cr2 : register_<0x04, uint32_t> {
                struct mms : mtl::hw::field<cr2, 4, 3> {
                    using option = mtl::hw::option<mms>;
                    constexpr static option reset = 0;
                    constexpr static option enable = 1;
                    constexpr static option update = 2;
                };
            };

            struct dier : register_<0x0c, uint32_t> {
                struct uie : mtl::hw::field<dier, 0, 1> {
                    using option = mtl::hw::option<uie>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };

                struct ude : mtl::hw::field<dier, 8, 1> {
                    using option = mtl::hw::option<ude>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };
            };

            struct sr : register_<0x10, uint32_t> {
                struct uif : mtl::hw::field<sr, 0, 1> {
                    using option = mtl::hw::option<uif>;
                    constexpr static option inactive = 0;
                    constexpr static option active = 1;
                };
            };

            struct egr : register_<0x14, uint32_t> {
                struct ug : mtl::hw::field<egr, 0, 1> {
                    using option = mtl::hw::option<ug>;
                    constexpr static option set = 1;
                };
            };

            struct cnt : register_<0x24, uint16_t> {};
            struct psc : register_<0x28, uint16_t> {};
            struct arr : register_<0x2c, uint16_t> {};
        };
    } // namespace descriptor

    using timer1 = descriptor::timer_1_8<0x40012c00>;
    using timer2 = descriptor::timer_2_5<0x40000000>;
    using timer3 = descriptor::timer_2_5<0x40000400>;
    using timer4 = descriptor::timer_2_5<0x40000800>;
    using timer5 = descriptor::timer_2_5<0x40000c00>;
    using timer6 = descriptor::timer_6_7<0x40001000>;
    using timer7 = descriptor::timer_6_7<0x40001400>;
    using timer8 = descriptor::timer_1_8<0x40013400>;
    using timer9 = descriptor::timer_9_12<0x40014c00>;
    using timer10 = descriptor::timer_10_14<0x40015000>;
    using timer11 = descriptor::timer_10_14<0x40015400>;
    using timer12 = descriptor::timer_9_12<0x40001800>;
    using timer13 = descriptor::timer_10_14<0x40001c00>;
    using timer14 = descriptor::timer_10_14<0x40002000>;

    template <class> struct timer;
    template <> struct timer<mtl::hw::ids::timer1> : timer1 {};
    template <> struct timer<mtl::hw::ids::timer2> : timer2 {};
    template <> struct timer<mtl::hw::ids::timer3> : timer3 {};
    template <> struct timer<mtl::hw::ids::timer4> : timer4 {};
    template <> struct timer<mtl::hw::ids::timer5> : timer5 {};
    template <> struct timer<mtl::hw::ids::timer6> : timer6 {};
    template <> struct timer<mtl::hw::ids::timer7> : timer7 {};
    template <> struct timer<mtl::hw::ids::timer8> : timer8 {};
    template <> struct timer<mtl::hw::ids::timer9> : timer9 {};
    template <> struct timer<mtl::hw::ids::timer10> : timer10 {};
    template <> struct timer<mtl::hw::ids::timer11> : timer11 {};
    template <> struct timer<mtl::hw::ids::timer12> : timer12 {};
    template <> struct timer<mtl::hw::ids::timer13> : timer13 {};
    template <> struct timer<mtl::hw::ids::timer14> : timer14 {};
} // namespace mtl::hw
