summaryrefslogtreecommitdiff
path: root/cesar/hal/leon/maximus/inc/maximus_trace.h
blob: 880f43f63242987864a89fe3e3b648bea9608e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef hal_leon_maximus_inc_trace_h
#define hal_leon_maximus_inc_trace_h
/* Cesar project {{{
 *
 * Copyright (C) 2007 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    hal/leon/maximus/inc/trace.h
 * \brief   Define leon timer trace events.
 * \ingroup hal_leon_maximus
 */
#include "lib/trace.h"

/** Shortcut for tracing inside Maximus. */
#define MAXIMUS_LEON_TIMER_TRACE(id, args...) \
    TRACE_FAST_SHORT (MAXIMUS_LEON_TIMER_TRACE_, &ctx->trace, id, ## args)

#if CONFIG_TRACE

enum
{
    MAXIMUS_LEON_TIMER_TRACE_INIT,
    MAXIMUS_LEON_TIMER_TRACE_UNINIT,
    MAXIMUS_LEON_TIMER_TRACE_LEON_TIMER_PROGRAM,
    MAXIMUS_LEON_TIMER_TRACE_LEON_TIMER_CANCEL,
    MAXIMUS_LEON_TIMER_TRACE_DEFERRED_CB,
    MAXIMUS_LEON_TIMER_TRACE_LEON_TIMER_CB,
};

BEGIN_DECLS

/**
 * Initialise trace buffer.
 * \param  ctx  phy context
 */
void
maximus_leon_timer_trace_init (leon_timer_t *ctx);

/**
 * Uninitialise trace buffer.
 * \param  ctx  phy context
 */
void
maximus_leon_timer_trace_uninit (leon_timer_t *ctx);

END_DECLS

#else /* !CONFIG_TRACE */

# define maximus_leon_timer_trace_init(ctx) ((void) 0)
# define maximus_leon_timer_trace_uninit(ctx) ((void) 0)

#endif /* !CONFIG_TRACE */

#endif /* hal_leon_maximus_inc_trace_h */