blob: 35082a045b6ab73be5ada9c065538c1234bea0e4 (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/*****************************************************************************
**
** Name: ptim.h
**
** Description: Protocol timer services.
**
** Copyright (c) 2003-2006, Broadcom Corp., All Rights Reserved.
** Widcomm Bluetooth Core. Proprietary and confidential.
**
*****************************************************************************/
#ifndef PTIM_H
#define PTIM_H
#include "gki.h"
/*****************************************************************************
** Constants and data types
*****************************************************************************/
typedef struct
{
TIMER_LIST_Q timer_queue; /* GKI timer queue */
INT32 period; /* Timer period in milliseconds */
UINT32 last_gki_ticks; /* GKI ticks since last time update called */
UINT8 timer_id; /* GKI timer id */
} tPTIM_CB;
#ifdef __cplusplus
extern "C"
{
#endif
/*****************************************************************************
** Function Declarations
*****************************************************************************/
/*******************************************************************************
**
** Function ptim_init
**
** Description Initialize a protocol timer service control block.
**
** Returns void
**
*******************************************************************************/
extern void ptim_init(tPTIM_CB *p_cb, UINT16 period, UINT8 timer_id);
/*******************************************************************************
**
** Function ptim_timer_update
**
** Description Update the protocol timer list and handle expired timers.
**
** Returns void
**
*******************************************************************************/
extern void ptim_timer_update(tPTIM_CB *p_cb);
/*******************************************************************************
**
** Function ptim_start_timer
**
** Description Start a protocol timer for the specified amount
** of time in milliseconds.
**
** Returns void
**
*******************************************************************************/
extern void ptim_start_timer(tPTIM_CB *p_cb, TIMER_LIST_ENT *p_tle, UINT16 type, INT32 timeout);
/*******************************************************************************
**
** Function ptim_stop_timer
**
** Description Stop a protocol timer.
**
** Returns void
**
*******************************************************************************/
extern void ptim_stop_timer(tPTIM_CB *p_cb, TIMER_LIST_ENT *p_tle);
#ifdef __cplusplus
}
#endif
#endif /* PTIM_H */
|