source: rtems/c/src/lib/libbsp/arm/tms570/include/system-clocks.h @ 991fdb33

4.11
Last change on this file since 991fdb33 was 46265063, checked in by Pavel Pisa <pisa@…>, on Aug 21, 2014 at 1:38:24 PM

bsp/tms570: implemented support functions to satisfy complete tests build requirements.

This patch enables to build all RTEMS tests for tms570ls3137_hdk_sdram
BSP variant in in default build. Debug build with --enable-rtems-debug set
has succeed for samples subset of tests as well.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 * @file benchmark_timer.c
3 *
4 * @ingroup tms570
5 *
6 * @brief System clocks.
7 */
8
9/*
10 * Copyright (c) 2014 Pavel Pisa <pisa@cmp.felk.cvut.cz>
11 *
12 * Czech Technical University in Prague
13 * Zikova 1903/4
14 * 166 36 Praha 6
15 * Czech Republic
16 *
17 * Based on LPC24xx and LPC1768 BSP
18 * by embedded brains GmbH and others
19 *
20 * The license and distribution terms for this file may be
21 * found in the file LICENSE in this distribution or at
22 * http://www.rtems.org/license/LICENSE.
23 */
24
25#ifndef LIBBSP_ARM_TMS570_SYSTEM_CLOCKS_H
26#define LIBBSP_ARM_TMS570_SYSTEM_CLOCKS_H
27
28#include <bsp/tms570-rti.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
34/**
35 * @defgroup tms570_clock System Clocks
36 *
37 * @ingroup tms570
38 *
39 * @brief System clocks.
40 *
41 * @{
42 */
43
44/**
45 * @brief Returns current standard timer value in microseconds.
46 *
47 * This function uses RTI module free running counter 0 used
48 * which is used as system tick timebase as well.
49 */
50static inline unsigned tms570_timer(void)
51{
52  uint32_t actual_fcr0 = TMS570_RTI.RTIFRC0;
53  return actual_fcr0;
54}
55
56/** @} */
57
58#ifdef __cplusplus
59}
60#endif /* __cplusplus */
61
62#endif /* LIBBSP_ARM_TMS570_SYSTEM_CLOCKS_H */
Note: See TracBrowser for help on using the repository browser.