summaryrefslogtreecommitdiff
path: root/hal/timer/inc/context.h
blob: 88eaf766c16b89d65ee84a4632c89f54ed38262b (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
#ifndef hal_timer_inc_context_h
#define hal_timer_inc_context_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    hal/timer/inc/context.h
 * \brief   API timer context. 
 * \ingroup hal/timer
 *
 */

#include <cyg/kernel/kapi.h>

#include "lib/heap.h"
#include "hal/leon/timer.h"
#include "hal/phy/phy.h"

struct hal_timer_t
{
    /** Timer status. */
    bool status;
    /** Timer context. */
    leon_timer_t *leon_timer;
    /** Heap to store order instances. */
    heap_t heap;
    /** Mutex for the heap. */
    cyg_mutex_t heap_mutex;
    /** phy context. */
    phy_t *phy;
    /** Current instance beeing process. */
    hal_timer_instance_t *current_instance;
};

#endif /* hal_timer_inc_context_h */