 enabled = 1;
                };

                struct jswstart : mtl::hw::field<cr2, 21, 1> {
                    using option = mtl::hw::option<jswstart>;
                    constexpr static option start = 1;
                };

                struct swstart : mtl::hw::field<cr2, 22, 1> {
                    using option = mtl::hw::option<swstart>;
                    constexpr static option start = 1;
                };

                struct tsvrefe : mtl::hw::field<cr2, 23, 1> {
                    using option = mtl::hw::option<tsvrefe>;
                    constexpr static option disabled = 0;
                    constexpr static option enabled = 1;
                };
            };

            template <uint8_t v_reg_index> struct smpr : register_<0x04 * v_reg_index + 0x0c, uint32_t> {
                template <uint8_t v_index> struct smp : mtl::hw::field<smpr, v_index * 3, 3> {
                    using option = mtl::hw::option<smp>;
                    constexpr static option cycles_1_5 = 0;
                    constexpr static option cycles_7_5 = 1;
                    constexpr static option cycles_13_5 = 2;
                    constexpr static option cycles_28_5 = 3;
                    constexpr static option cycles_41_5 = 4;
                    constexpr static option cycles_55_5 = 5;
                    constexpr static option cycles_71_5 = 6;
                    constexpr static option cycles_239_5 = 7;
                };
            };

            template <uint8_t v_reg_index> struct jofr : register_<0x04 * v_reg_index + 0x14, uint32_t> {
                struct joffset : mtl::hw::field<jofr, 0, 12> {};
            };

            struct htr : register_<0x24, uint32_t> {
                struct ht : mtl::hw::field<htr, 0, 12> {};
            };

            struct ltr : register_<0x28, uint32_t> {
                struct lt : mtl::hw::field<ltr, 0, 12> {};
            };

            template <uint8_t v_reg_index> struct sqr : register_<0x04 * v_reg_index + 0x2c, uint32_t> {
                template <uint8_t v_index> struct sq : mtl::hw::field<sqr, v_index * 4, 4> {};
            };

            // template <> struct sqr<0> : register_<0x2c, uint32_t> {
            //     template <uint8_t v_index> struct sq : mtl::hw::field<sqr, v_index * 4, 4> {};
            //     struct l : mtl::hw::field<l, 20, 4> {};
            // };

            struct jsqr : register_<0x38, uint32_t> {
                template <uint8_t v_index> struct jsq : mtl::hw::field<jsqr, v_index * 5, 5> {};
                struct jl : mtl::hw::field<jsqr, 20, 2> {};
            };

            template <uint8_t v_reg_index> struct jdr : register_<0x04 * v_reg_index + 0x3c, uint32_t> {
                struct jdata : mtl::hw::field<jdr, 0, 16> {};
            };

            struct dr : register_<0x4c, uint32_t> {
                struct data : mtl::hw::field<dr, 0, 16> {};
                struct adc2data : mtl::hw::field<dr, 16, 16> {};
            };
        };
    }; // namespace descriptor

    using adc1 = descriptor::adc<0x40012400>;
    using adc2 = descriptor::adc<0x40012800>;
} // namespace mtl::hw
