#ifndef __CYMBET_H__

  #define __CYMBET_H__
  
  #include "FslTypes.h"
  #include "derivative.h"
  #include "S08_TPM.h"
  
  #define CONFIG_CBC_EVAL_EN_PULL_UP     PTBPE_PTBPE3 = 1
  #define CONFIG_CBC_EVAL_EN_DDR         PTBDD_PTBDD3 = 0
  
  //#define CONFIG_CBC_EVAL_RST()          IRQSC = IRQSC_IRQPE_MASK | IRQSC_IRQACK_MASK | IRQSC_IRQIE_MASK | IRQSC_IRQMOD_MASK
                                           /* TIMER_INIT (Timer, Configuration) */
  #define CONFIG_CBC_EVAL_RST()            TIMER_INIT(1, TPM_BUS_CLOCK | TPM_PRESCALER_1);\
  TIMER_CHANNEL_INIT(1, 0, (UINT8)(INPUT_CAPTURE_FALLING_EDGE | TPM_CHANNEL_INTERRUPT));
  
  #define CBC_RST_INTERRUPT()            gu8TPM_Status & (1<<TPM1_CHAN0_INTERRUPT) || (!PTCD_PTCD2)
  #define CBC_EVAL_ACK_INTERRUPT()       gu8TPM_Status &= ~(1<<TPM1_CHAN0_INTERRUPT)
  
  
  void vfnCymbet_Init(void);
  
  
#endif