Tracerestrict: Add get/set to use auxiliary and cond op as a single field
This commit is contained in:
@@ -110,6 +110,9 @@ enum TraceRestrictItemFlagAllocation {
|
|||||||
TRIFA_COND_OP_COUNT = 3,
|
TRIFA_COND_OP_COUNT = 3,
|
||||||
TRIFA_COND_OP_OFFSET = 13,
|
TRIFA_COND_OP_OFFSET = 13,
|
||||||
|
|
||||||
|
TRIFA_CMB_AUX_COND_COUNT = 5, ///< This aliases the AUX_FIELD and COND_OP fields as a single wider field
|
||||||
|
TRIFA_CMB_AUX_COND_OFFSET = 11,
|
||||||
|
|
||||||
TRIFA_VALUE_COUNT = 16,
|
TRIFA_VALUE_COUNT = 16,
|
||||||
TRIFA_VALUE_OFFSET = 16,
|
TRIFA_VALUE_OFFSET = 16,
|
||||||
};
|
};
|
||||||
@@ -638,6 +641,12 @@ inline uint8_t GetTraceRestrictAuxField(TraceRestrictItem item)
|
|||||||
return GB(item, TRIFA_AUX_FIELD_OFFSET, TRIFA_AUX_FIELD_COUNT);
|
return GB(item, TRIFA_AUX_FIELD_OFFSET, TRIFA_AUX_FIELD_COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get TraceRestrictItem combined condition operator and auxiliary fields */
|
||||||
|
inline uint8_t GetTraceRestrictCombinedAuxCondOpField(TraceRestrictItem item)
|
||||||
|
{
|
||||||
|
return GB(item, TRIFA_CMB_AUX_COND_OFFSET, TRIFA_CMB_AUX_COND_COUNT);
|
||||||
|
}
|
||||||
|
|
||||||
/** Get TraceRestrictItem value field */
|
/** Get TraceRestrictItem value field */
|
||||||
inline uint16_t GetTraceRestrictValue(TraceRestrictItem item)
|
inline uint16_t GetTraceRestrictValue(TraceRestrictItem item)
|
||||||
{
|
{
|
||||||
@@ -668,6 +677,12 @@ inline void SetTraceRestrictAuxField(TraceRestrictItem &item, uint8_t data)
|
|||||||
SB(item, TRIFA_AUX_FIELD_OFFSET, TRIFA_AUX_FIELD_COUNT, data);
|
SB(item, TRIFA_AUX_FIELD_OFFSET, TRIFA_AUX_FIELD_COUNT, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set TraceRestrictItem combined condition operator and auxiliary fields */
|
||||||
|
inline void SetTraceRestrictCombinedAuxCondOpField(TraceRestrictItem &item, uint8_t data)
|
||||||
|
{
|
||||||
|
SB(item, TRIFA_CMB_AUX_COND_OFFSET, TRIFA_CMB_AUX_COND_COUNT, data);
|
||||||
|
}
|
||||||
|
|
||||||
/** Set TraceRestrictItem value field */
|
/** Set TraceRestrictItem value field */
|
||||||
inline void SetTraceRestrictValue(TraceRestrictItem &item, uint16_t value)
|
inline void SetTraceRestrictValue(TraceRestrictItem &item, uint16_t value)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user