Mistake on this page?
Report an issue in GitHub or email us
pal_timer.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Timer interface file.
6  *
7  * Copyright (c) 2016-2019 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 
25 #ifndef PAL_TIMER_H
26 #define PAL_TIMER_H
27 
28 #include "pal_types.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /*! \addtogroup PAL_TIMER
35  * \{ */
36 
37 /**************************************************************************************************
38  Macros
39 **************************************************************************************************/
40 
41 /*! \brief Operational states. */
42 typedef enum
43 {
44  PAL_TIMER_STATE_UNINIT = 0, /*!< Uninitialized state. */
45  PAL_TIMER_STATE_ERROR = 0, /*!< Error state. */
46  PAL_TIMER_STATE_READY, /*!< Ready state. */
47  PAL_TIMER_STATE_BUSY /*!< Busy state. */
49 
50 /**************************************************************************************************
51  Data Types
52 **************************************************************************************************/
53 
54 /*! \brief Completion callback. */
55 typedef void (*PalTimerCompCback_t)(void);
56 
57 /**************************************************************************************************
58  Function Declarations
59 **************************************************************************************************/
60 
61 /* Initialization */
62 void PalTimerInit(PalTimerCompCback_t expCback);
63 void PalTimerDeInit(void);
64 
65 /* Control and Status */
66 PalTimerState_t PalTimerGetState(void);
67 void PalTimerStart(uint32_t expUsec);
68 void PalTimerStop(void);
69 uint32_t PalTimerGetCurrentTime(void);
70 
71 /*! \} */ /* PAL_TIMER */
72 
73 #ifdef __cplusplus
74 };
75 #endif
76 
77 #endif
PalTimerState_t
Operational states.
Definition: pal_timer.h:42
void(* PalTimerCompCback_t)(void)
Completion callback.
Definition: pal_timer.h:55
Platform-independent data types.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.