ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bm_timer.c
Go to the documentation of this file.
1 
2 
3 #include "isf_target.h"
4 #include "isf.h"
5 #include "fsl_pit_hal.h"
6 #include "fsl_pit_driver.h"
7 #include "bm_internal.h"
8 #include "bm_timer.h"
9 
10 
11 /*!
12  *
13  * @brief Timer initialization\n
14  *
15  * @param bEnableirq - [in] TRUE to enable timer interrupt
16  * @param usec - [in] Initial time in usec to program in timer
17  *
18  * @return \n
19  *
20  * @errors \n
21  *
22  * @constraints \n
23  *
24  * @reentrant No.
25  *
26  * @libs \n
27  *
28  * @see \n
29  *
30  */
31 void bm_timer_init(boolean bEnableirq, uint32 usec)
32 {
33 #if 0
34  pit_user_config_t pit_config = {
35  .isInterruptEnabled = bEnableirq,
36  .isTimerChained = FALSE,
37  .periodUs = usec
38  };
41 
42  // This call will start the timer.
44 
45  // Just clear the interrupt flag
47 
48  //bm_timer_set_time(usec);
49 
50  // Need to stop timer.
52 #endif
53 
54  pit_init(bEnableirq,usec);
55 
56 }
57 
58 
59 
ISF board support header files.
#define ISF_BM_PIT_INSTANCE
#define FALSE
Definition: isf_types.h:56
void pit_set_timer_period_us(uint32_t timer, uint32_t us)
Set timer period in microsecond units.
void pit_init_module(bool isRunInDebug)
Initialize PIT module.
void bm_timer_init(boolean bEnableirq, uint32 usec)
Timer initialization .
Definition: bm_timer.c:31
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
void pit_init(bool bEnableirq, uint32 usec)
Complete initialization of the PIT timer.
void pit_init_channel(uint32_t timer, const pit_user_config_t *config)
Initialize PIT channel.
void pit_hal_clear_interrupt_flag(uint32_t timer)
Clear timer interrupt flag.
Definition: fsl_pit_hal.c:105
void pit_timer_stop(uint32_t timer)
Stop timer counting.
bool isInterruptEnabled
ISF bus management internal header file.
Main ISF header file. Contains code common to all ISF components.
fsl_pit_driver.h defines structures and types for the PIT driver.
PIT timer configuration structure.
Bus managment internal header file.