5
Last change
on this file since 29430a3 was
069560a,
checked in by Premysl Houdek <kom541000@…>, on 07/16/15 at 12:14:32
|
bsp/tms570: source changes reflecting new headers.
Signed-off-by: Premysl Houdek <kom541000@…>
|
-
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 |
---|
31 | extern "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 | */ |
---|
50 | static inline unsigned tms570_timer(void) |
---|
51 | { |
---|
52 | uint32_t actual_fcr0 = TMS570_RTI.CNT[0].FRCx; |
---|
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.