microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
register.hpp File Reference

Static bitfield / register descriptor formatting views. More...

#include "../microfmt.hpp"
#include <cstddef>
#include <cstdint>
#include <string_view>
#include <type_traits>
Include dependency graph for register.hpp:

Go to the source code of this file.

Classes

struct  microfmt::reg_field
 Describes a single bitfield within a register. More...
 
struct  microfmt::reg_descriptor< N >
 Static register descriptor listing its bitfields. More...
 
struct  microfmt::reg_view< N, UInt >
 Non-owning view pairing a register value with its static descriptor. More...
 
struct  microfmt::formatter< reg_view< N, UInt > >
 Formatter for reg_view that decodes and renders register fields. More...
 

Namespaces

namespace  microfmt
 

Functions

template<typename... Fields>
 microfmt::reg_descriptor (microfmt::string_view, size_t, Fields...) -> reg_descriptor< sizeof...(Fields)>
 Deduction guide deriving the field count for reg_descriptor.
 
template<size_t N, typename UInt >
constexpr auto microfmt::format_reg (UInt val, const reg_descriptor< N > &desc) noexcept
 Builds a reg_view from a register value and its descriptor.
 

Detailed Description

Static bitfield / register descriptor formatting views.