Functions | |
void | Cy_Profile_ClearConfiguration (void) |
Clears all counter configurations and sets all counters and overflow counters to 0. More... | |
__STATIC_INLINE void | Cy_Profile_ClearCounters (void) |
Clears all hardware counters to 0. More... | |
cy_stc_profile_ctr_ptr_t | Cy_Profile_ConfigureCounter (en_ep_mon_sel_t monitor, cy_en_profile_duration_t duration, cy_en_profile_ref_clk_t refClk, uint32_t weight) |
Configures and assigns a hardware profile counter to the list of used counters. More... | |
cy_en_profile_status_t | Cy_Profile_FreeCounter (cy_stc_profile_ctr_ptr_t ctrAddr) |
Frees up a counter from a previously-assigned monitor source. More... | |
cy_en_profile_status_t | Cy_Profile_EnableCounter (cy_stc_profile_ctr_ptr_t ctrAddr) |
Enables an assigned counter. More... | |
cy_en_profile_status_t | Cy_Profile_DisableCounter (cy_stc_profile_ctr_ptr_t ctrAddr) |
Disables an assigned counter. More... | |
void Cy_Profile_ClearConfiguration | ( | void | ) |
Clears all counter configurations and sets all counters and overflow counters to 0.
Calls Cy_Profile_ClearCounters() to clear counter registers.
__STATIC_INLINE void Cy_Profile_ClearCounters | ( | void | ) |
Clears all hardware counters to 0.
cy_stc_profile_ctr_ptr_t Cy_Profile_ConfigureCounter | ( | en_ep_mon_sel_t | monitor, |
cy_en_profile_duration_t | duration, | ||
cy_en_profile_ref_clk_t | refClk, | ||
uint32_t | weight | ||
) |
Configures and assigns a hardware profile counter to the list of used counters.
This function assigns an available profile counter to a slot in the internal software data structure and returns the handle for that slot location. The data structure is used to keep track of the counter status and to implement a 64-bit profile counter. If no counter slots are available, the function returns a NULL pointer.
monitor | The monitor source number |
duration | Events are monitored (0), or duration is monitored (1) |
refClk | Counter reference clock |
weight | Weighting factor for the counter value |
cy_en_profile_status_t Cy_Profile_FreeCounter | ( | cy_stc_profile_ctr_ptr_t | ctrAddr | ) |
Frees up a counter from a previously-assigned monitor source.
Cy_Profile_ConfigureCounter() must have been called for this counter before calling this function.
ctrAddr | The handle to the assigned counter (returned by calling Cy_Profile_ConfigureCounter()). |
cy_en_profile_status_t Cy_Profile_EnableCounter | ( | cy_stc_profile_ctr_ptr_t | ctrAddr | ) |
Enables an assigned counter.
Cy_Profile_ConfigureCounter() must have been called for this counter before calling this function.
ctrAddr | The handle to the assigned counter, (returned by calling Cy_Profile_ConfigureCounter()). |
cy_en_profile_status_t Cy_Profile_DisableCounter | ( | cy_stc_profile_ctr_ptr_t | ctrAddr | ) |
Disables an assigned counter.
Cy_Profile_ConfigureCounter() must have been called for this counter before calling this function.
ctrAddr | The handle to the assigned counter, (returned by calling Cy_Profile_ConfigureCounter()). |