KM3NeT CLB
2.0
KM3NeT CLB v2 Embedded Software
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
timer.h
Go to the documentation of this file.
1
/*
2
* KM3NeT CLB v2 Firmware
3
*
4
* Copyright 2013 KM3NeT Collaboration
5
*
6
* All Rights Reserved.
7
*
8
* timer.h
9
*
10
* Created on: 16 jul. 2013
11
* Author: Vincent van Beveren
12
*/
13
14
15
#ifndef TIMER_H_
16
#define TIMER_H_
17
18
/**
19
* @file
20
*
21
* @ingroup kernel
22
*
23
* @todo describe timer module
24
*/
25
26
#include <stdint.h>
27
28
#include "
cfg_soc.h
"
29
30
#define TIMER_SECT_COUNT 3
///< No of timers to add
31
#define TIMER_SUM_SECS 5
///< No of seconds to sum
32
33
#define TIMER_SECT_IDLE 0
///< time spend being idle
34
#define TIMER_SECT_TASK 1
///< time spend executing a task
35
#define TIMER_SECT_IRQ 2
///< time spend in IRQs
36
37
#define TIMER_MAX_COUNT ( TIMER_SUM_SECS * 1000 )
38
39
#if TIMER_MAX_COUNT > 0xFFFFFFFF
40
#error "Possible timer value overflow, please decrease sum seconds"
41
#endif
42
43
/**
44
* Initializes the timer.
45
*/
46
void
timerInit
();
47
48
/**
49
* Starts the timing of a new section, the previous section is returned, or -1 if it is the first
50
*/
51
int
timerMark
(
int
section);
52
53
/**
54
* Returns
55
* @return
56
*/
57
uint32_t *
timerValues
();
58
59
#endif
/* TIMER_H_ */
cfg_soc.h
Defines the configuration of the LM32 SOC for the CLBv2.
timerMark
int timerMark(int section)
Starts the timing of a new section, the previous section is returned, or -1 if it is the first...
Definition:
timer.c:53
timerValues
uint32_t * timerValues()
Returns.
Definition:
timer.c:71
timerInit
void timerInit()
Initializes the timer.
Definition:
timer.c:27
src
platform
kernel
timer.h
Generated on Mon Aug 3 2020 08:50:23 for KM3NeT CLB by
1.8.5