36#ifndef IMT_BASE_CORE_UTIL_KEYWRITEONLYPOLICY_H
37#define IMT_BASE_CORE_UTIL_KEYWRITEONLYPOLICY_H
52template<
unsigned key_mask,
unsigned key_offset,
unsigned key_value>
61 static void write(
unsigned volatile* reg,
unsigned mask,
unsigned offset,
unsigned value) {
62 unsigned volatile tmp = (value & mask) << offset;
63 tmp &= ~(key_mask << key_offset);
64 tmp |= (key_value & key_mask) << key_offset;
This is a application specific file which is used to configure Imt.Base.Core.Math.
A write-only mutability policy to enable writing registers like new reset register.
static void write(unsigned volatile *reg, unsigned mask, unsigned offset, unsigned value)
Write bit field to a write-only address.