Program Listing for File interrupt_cluster.h

Program Listing for File interrupt_cluster.h#

Return to documentation for file (src/generated/structs/interrupt_cluster.h)

#pragma once
#ifndef RP2040_STRUCTS_INTERRUPT_CLUSTER_H
#define RP2040_STRUCTS_INTERRUPT_CLUSTER_H

#include "../ifgen/common.h"

namespace RP2040
{

struct interrupt_cluster
{
    /* Constant attributes. */
    static constexpr struct_id_t id =
        1;
    static constexpr std::size_t size =
        12;
    /* Fields. */
    uint32_t E;
    uint32_t F;
    uint32_t S;
    /* Methods. */

    inline uint16_t get_E() volatile
    {
        return E & 0xffffu;
    }

    inline void set_E(uint16_t value) volatile
    {
        uint32_t curr = E;

        curr &= ~(0xffffu);
        curr |= (value & 0xffffu);

        E = curr;
    }

    inline uint16_t get_F() volatile
    {
        return F & 0xffffu;
    }

    inline void set_F(uint16_t value) volatile
    {
        uint32_t curr = F;

        curr &= ~(0xffffu);
        curr |= (value & 0xffffu);

        F = curr;
    }

    inline uint16_t get_S() volatile
    {
        return S & 0xffffu;
    }

    inline void set_S(uint16_t value) volatile
    {
        uint32_t curr = S;

        curr &= ~(0xffffu);
        curr |= (value & 0xffffu);

        S = curr;
    }
};

static_assert(sizeof(interrupt_cluster) == interrupt_cluster::size);
static_assert(ifgen_struct<interrupt_cluster>);

static volatile interrupt_cluster *const INTERRUPT_CLUSTER_NULL =
    reinterpret_cast<interrupt_cluster *>(0x00000000);

}; // namespace RP2040

#endif