CPU_TS_TmrFreqGet

Description

Gets CPU timestamp’s timer frequency, in Hertz.

Files

cpu_core.h/cpu_core.c

Prototype

          CPU_TS_TMR_FREQ  CPU_TS_TmrFreqGet (CPU_ERR *p_err);


Arguments

p_err

Pointer to variable that will receive the return error code from this function:

CPU_ERR_NONE
CPU_ERR_NULL_PTR

Returned Value

CPU timestamp’s timer frequency (in Hertz), if no errors;

0, otherwise.

Required Configuration

Available only if either of the following CPU features is enabled in cpu_cfg.h :

Notes / Warnings

None.

Example Usage

Listing - CPU_TS_TmrFreqGet() example usage
          CPU_TS_TMR_FREQ  freq_hz;
          CPU_ERR          err;
           
           
          freq_hz = CPU_TS_TmrFreqGet(&err);  /* Get CPU timestamp timer frequency. */
           
          if (err == CPU_ERR_NONE) {
              printf("CPU Timestamp Timer Frequency = %d", freq_hz);
          } else {
              printf("CPU TIMESTAMP TIMER FREQUENCY NOT AVAILABLE.");
          }