• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Bestechnic (Shanghai) Co., Ltd. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef __HAL_TIMER_FAST_IRQ_H__
16 #define __HAL_TIMER_FAST_IRQ_H__
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "hal_timer.h"
23 
24 void hal_fast_timer_setup(enum HAL_TIMER_TYPE_T type, HAL_TIMER_IRQ_HANDLER_T handler);
25 
26 void hal_fast_timer_start(uint32_t load);
27 
28 void hal_fast_timer_stop(void);
29 
30 void hal_fast_timer_pause(void);
31 
32 void hal_fast_timer_continue(void);
33 
34 int hal_fast_timer_is_enabled(void);
35 
36 void hal_fast_timer_reload(uint32_t load);
37 
38 uint32_t hal_fast_timer_get_raw_value(void);
39 
40 int hal_fast_timer_irq_active(void);
41 
42 int hal_fast_timer_irq_pending(void);
43 
44 uint32_t hal_fast_timer_get_elapsed_time(void);
45 
46 uint32_t hal_fast_timer_get_load(void);
47 
48 uint32_t hal_fast_timer_get_count(void);
49 
50 void hal_fast_timer_bgload(uint32_t load);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif
57