
#ifdef        GLOBALS_BSP_TPM
    #define   EXTERN_BSP_TPM
   
#else
    #define   EXTERN_BSP_TPM     extern
#endif

#ifndef _BSP_TPM_H_
#define _BSP_TPM_H_
  
        #define           TPM_DIV4              2
        #define           TPM_DIV2              1
        #define           TPM_DIV1              0
        #define           TPM_DIV128            7

  
        #define           TT_10ms                 5
        #define           TT_15ms                 7
        #define           TT_20ms                 10
        #define           TT_30ms                 TT_15ms *2
        #define           TT_50ms                 24
        #define           TT_100ms                49
        #define           TT_170ms                85
        #define           TT_200ms                96 
        #define           TT_120ms                58 
        #define           TT_180ms                87 
        #define           TT_240ms                117 
        #define           TT_250ms                122 
        #define           TT_340ms                165
        #define           TT_500ms                TT_100ms *5
        #define           TT_750ms                367
        #define           TT_1s                   490
        #define           TT_1_5s                 735
        #define           TT_2s                   980
        #define           TT_2_5s                 1225
        #define           TT_3s                   1465
        #define           TT_6s                   2930
        #define           TT_8s                   3186
        
        #define              T1_2ms                            1
        #define              T1_4ms                            T1_2ms * 2
        #define              T1_10ms                           T1_2ms * 5
    		#define              T1_16ms                           T1_2ms * 8
        #define              T1_20ms                           T1_2ms * 10
        #define              T1_30ms                           T1_2ms * 15
        #define              T1_50ms                           T1_2ms * 25
        #define              T1_54ms                           T1_2ms * 27
        #define              T1_65ms                           T1_2ms * 32
        #define              T1_96ms                           T1_2ms * 48
        #define              T1_98ms                           T1_2ms * 49
        #define              T1_100ms                          T1_2ms * 50
        #define              T1_200ms                          T1_100ms * 2
    		#define              T1_250ms                          T1_2ms * 125
        #define              T1_340ms                          T1_2ms * 170
        #define              T1_344ms                          T1_2ms * 172
        #define              T1_500ms                          T1_100ms * 5
        #define              T1_600ms                          T1_100ms * 6
        #define              T1_750ms                          T1_2ms * 375
        #define              T1_754ms                          T1_2ms * 377
        #define              T1_1s                             T1_100ms * 10
        #define              T1_2s                             T1_100ms * 20
        #define              T1_1_004s                         T1_2ms * 502
        #define              T1_2_5s                           T1_100ms * 25
        #define              T1_3s                             T1_100ms * 30


        #define              T2_10ms                           1
        #define              T2_20ms                           T2_10ms * 2
        #define              T2_100ms                          T2_10ms * 10
        #define              T2_250ms                          T2_10ms * 25
        #define              T2_1s                             T2_10ms * 100
        #define              T2_5s                             T2_10ms * 500
        #define              T2_3min                           T2_1s * 180        
  
        EXTERN_BSP_TPM              void        bsp_Timer0_Init(INT8U TPM_DIV);
        EXTERN_BSP_TPM              void        bsp_Timer1_Init(INT8U TPM_DIV);
        EXTERN_BSP_TPM    interrupt void        bsp_Timer0_isr(void);
        EXTERN_BSP_TPM    interrupt void        bsp_Timer1_isr(void);


  
#endif /* _BSP_TPM_H_ */
