Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
Listing - 48-bit Down timer example
Listing - 48-bit Down timer example

Code Block
languagecpp
titleListing - 48-bit Down timer example
linenumberstrue
          CPU_TS_TMR  CPU_TS_TmrRd (void)
          {
              CPU_INT64U  tmr_val;
              CPU_TS_TMR  ts_tmr_cnts;  /* sizeof(CPU_TS_TMR) = 32 bits */
           
           
              tmr_val     =                       /* Insert code to read 48-bit down timer value.        */ ;
              ts_tmr_cnts = (CPU_TS_TMR)tmr_val;  /* Truncate 48-bit timer value to 32-bit timestamp ... */
                                                  /* ... timer data type.                                */
              ts_tmr_cnts = ~ts_tmr_cnts;         /* Ones-complement truncated  down timer value.        */
           
              return (ts_tmr_cnts);
          }

...