50 #ifndef __RKHTRC_FILTER_H__
51 #define __RKHTRC_FILTER_H__
62 #if RKH_CFG_TRC_EN == RKH_ENABLED && RKH_CFG_TRC_RTFIL_EN == RKH_ENABLED
70 #define RKH_FILTER_ON_GROUP(grp) \
71 rkh_trc_filter_group_(FILTER_ON, (grp), EUNCHANGE)
80 #define RKH_FILTER_OFF_GROUP(grp) \
81 rkh_trc_filter_group_(FILTER_OFF, (grp), EUNCHANGE)
90 #define RKH_FILTER_ON_EVENT(evt) \
91 rkh_trc_filter_event_(FILTER_ON, (evt))
103 #define RKH_FILTER_OFF_EVENT(evt) \
104 rkh_trc_filter_event_(FILTER_OFF, (evt))
112 #define RKH_FILTER_ON_GROUP_ALL_EVENTS(grp) \
113 rkh_trc_filter_group_(FILTER_ON, (grp), ECHANGE)
124 #define RKH_FILTER_OFF_GROUP_ALL_EVENTS(grp) \
125 rkh_trc_filter_group_(FILTER_OFF, (grp), ECHANGE)
127 #if RKH_CFG_TRC_RTFIL_SMA_EN == RKH_ENABLED
136 #define RKH_FILTER_ON_SMA(sma) \
137 rkh_trc_symFil(RKHFilterSma, RKH_SMA_ACCESS_CONST(sma, prio), \
146 #define RKH_FILTER_ON_ALL_SMA() \
147 rkh_trc_symFil(RKHFilterSma, 0, RKH_TRC_SET_ALL(FILTER_ON))
156 #define RKH_FILTER_OFF_SMA(sma) \
157 rkh_trc_symFil(RKHFilterSma, RKH_SMA_ACCESS_CONST(sma, prio), \
166 #define RKH_FILTER_OFF_ALL_SMA() \
167 rkh_trc_symFil(RKHFilterSma, 0, RKH_TRC_SET_ALL(FILTER_OFF))
170 #define RKH_FILTER_ON_SMA(sma) (void)0
171 #define RKH_FILTER_ON_ALL_SMA() (void)0
172 #define RKH_FILTER_OFF_SMA(sma) (void)0
173 #define RKH_FILTER_OFF_ALL_SMA() (void)0
176 #if RKH_CFG_TRC_RTFIL_SIGNAL_EN == RKH_ENABLED
184 #define RKH_FILTER_ON_SIGNAL(sig) \
185 rkh_trc_symFil(RKHFilterSignal, (sig), FILTER_ON)
193 #define RKH_FILTER_ON_ALL_SIGNALS() \
194 rkh_trc_symFil(RKHFilterSignal, 0, RKH_TRC_SET_ALL(FILTER_ON))
203 #define RKH_FILTER_OFF_SIGNAL(sig) \
204 rkh_trc_symFil(RKHFilterSignal, (sig), FILTER_OFF)
212 #define RKH_FILTER_OFF_ALL_SIGNALS() \
213 rkh_trc_symFil(RKHFilterSignal, 0, RKH_TRC_SET_ALL(FILTER_OFF))
215 #define RKH_FILTER_ON_SIGNAL(sig) (void)0
216 #define RKH_FILTER_ON_ALL_SIGNALS() (void)0
217 #define RKH_FILTER_OFF_SIGNAL(sig) (void)0
218 #define RKH_FILTER_OFF_ALL_SIGNALS() (void)0
221 #define RKH_FILTER_ON_GROUP(grp) (void)0
222 #define RKH_FILTER_OFF_GROUP(grp) (void)0
223 #define RKH_FILTER_ON_EVENT(evt) (void)0
224 #define RKH_FILTER_OFF_EVENT(evt) (void)0
225 #define RKH_FILTER_ON_GROUP_ALL_EVENTS(grp) (void)0
226 #define RKH_FILTER_OFF_GROUP_ALL_EVENTS(grp) (void)0
227 #define RKH_FILTER_ON_SMA(sma) (void)0
228 #define RKH_FILTER_ON_ALL_SMA() (void)0
229 #define RKH_FILTER_OFF_SMA(sma) (void)0
230 #define RKH_FILTER_OFF_ALL_SMA() (void)0
231 #define RKH_FILTER_ON_SIGNAL(sig) (void)0
232 #define RKH_FILTER_ON_ALL_SIGNALS() (void)0
233 #define RKH_FILTER_OFF_SIGNAL(sig) (void)0
234 #define RKH_FILTER_OFF_ALL_SIGNALS() (void)0
243 #if RKH_TRC_MAX_SMA > RKH_TRC_MAX_SIGNALS
244 #if (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(8)
246 #elif (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(16)
248 #elif (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(32)
254 #if (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(8)
256 #elif (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(16)
258 #elif (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(32)
277 FILTER_ON, FILTER_OFF
280 typedef enum RKHFilter
282 RKHFilterTrcEvt, RKHFilterSignal, RKHFilterSma,
286 typedef struct RKH_FilterTbl
292 const RKH_GMTBL_T *grpFilMap;
416 void rkh_trc_symFil(RKHFilter fd, RKH_TRC_FSLOT slot, rui8_t mode);
Defines constants and macros which are internally used by RKH trace facility.
void rkh_trc_filter_get(RKH_FilterTbl *outFilterTbl)
Get a memory reference to every trace filter table.
Represents the filter of signal and active object.
void rkh_trc_filter_group_(rui8_t ctrl, RKH_TG_T grp, rui8_t mode)
Emit or suppress all trace events from a specific group.
void rkh_trc_symFil(RKHFilter fd, RKH_TRC_FSLOT slot, rui8_t mode)
Emmit or suppresse trace events related to a particular active object or event signal.
rui8_t RKH_TE_ID_T
Describes a trace event identification (ID).
rui8_t RKH_TG_T
Group of events.
void rkh_trc_filter_event_(rui8_t ctrl, RKH_TE_ID_T evt)
Emit or suppress a specific event.
rbool_t rkh_trc_symFil_isoff(RKHFilter fd, RKH_TRC_FSLOT slot)
Test the active objecto or signal filter condition.
rui8_t RKH_TRC_FSLOT
This data type defines the size of filter table for AO and signals.
rbool_t rkh_trc_isoff_(RKH_TE_ID_T e)
Test the group and event filter condition.