// FlexIO test   
  FLEXIO_ShifterTimerSel (SHIFTER0, TIMER0);
  FLEXIO_ShifterTimerPol (SHIFTER0, TIMER_POSITIVE_EDGE);
  FLEXIO_ShifterTimerPol (SHIFTER0, TIMER_NEGATIVE_EDGE);
  FLEXIO_ShifterInSrc (SHIFTER0, INSRC_PIN);
  FLEXIO_ShifterInSrc (SHIFTER3, INSRC_NEXT_SHIFTER_OUT);
  
  FLEXIO_ShifterPinPol (SHIFTER0, POLARITY_HIGH);
  FLEXIO_ShifterPinPol (SHIFTER0, POLARITY_LOW);
  
  FLEXIO_ShifterStopBit (SHIFTER0, STOPBIT_LOG0);
  FLEXIO_ShifterStopBit (SHIFTER0, STOPBIT_LOG1);
  FLEXIO_ShifterStartBit (SHIFTER0, STARTBIT_DISABLED_ON_FIRST);
  FLEXIO_ShifterStartBit (SHIFTER0, STARTBIT_DISABLED_ON_EN);
  
  FLEXIO_WriteShifterBuffer (SHIFTER0, DEFAULT, 0xFF32);
  FLEXIO_WriteShifterBuffer (SHIFTER0, BITBYTE_SWAPED, 0xFF32);
  FLEXIO_WriteShifterBuffer (SHIFTER0, BYTE_SWAPED, 0xFF32);
  FLEXIO_WriteShifterBuffer (SHIFTER0, BIT_SWAPED, 0xFF32);
  
  FLEXIO_ReadShifterBuffer (SHIFTER0, DEFAULT);
  FLEXIO_ReadShifterBuffer (SHIFTER0, BITBYTE_SWAPED);
  FLEXIO_ReadShifterBuffer (SHIFTER0, BYTE_SWAPED);
  FLEXIO_ReadShifterBuffer (SHIFTER0, BIT_SWAPED);
  
  FLEXIO_TimerTrgSel (TIMER0, TIMTRG_TIM0TRGOUT);
  FLEXIO_TimerTrgSel (TIMER1, TIMTRG_SHIFT0);
  FLEXIO_TimerTrgSel (TIMER2, TIMTRG_PIN4);
  FLEXIO_TimerTrgSel (TIMER3, TIMTRG_PIN0);
  
  FLEXIO_TimerTrgPol (TIMER3, POLARITY_HIGH);
  FLEXIO_TimerTrgPol (TIMER3, POLARITY_LOW);
  
  FLEXIO_TimerTrgSrc (TIMER3, EXT_TRG);
  FLEXIO_TimerTrgSrc (TIMER3, INT_TRG);
  
  FLEXIO_TimerPinCfg (TIMER0, PIN_DISABLED);
  FLEXIO_TimerPinCfg (TIMER1, PIN_OD_BI_OUTPUT);
  FLEXIO_TimerPinCfg (TIMER2, PIN_BI_OUTPUTDATA);
  FLEXIO_TimerPinCfg (TIMER3, PIN_OUTPUT);
  
  FLEXIO_ShifterPinSel (SHIFTER0, FLEXIO_PIN0);
  FLEXIO_ShifterPinSel (SHIFTER3, FLEXIO_PIN1);
  FLEXIO_TimerPinSel (TIMER2, FLEXIO_PIN2);
  FLEXIO_TimerPinSel (TIMER3, FLEXIO_PIN7);
  
  FLEXIO_TimerPinPol (TIMER3, POLARITY_HIGH);
  FLEXIO_TimerPinPol (TIMER3, POLARITY_LOW);
  
  FLEXIO_TimerMode (TIMER0, TIMER_DISABLED);
  FLEXIO_TimerMode (TIMER1, TIMER_8BIT_BAUD_MODE);
  FLEXIO_TimerMode (TIMER2, TIMER_8BIT_PWM_MODE);
  FLEXIO_TimerMode (TIMER3, TIMER_16BIT_MODE);
  
  FLEXIO_TimerClock (TIMER0, LOG1_ON_EN);
  FLEXIO_TimerClock (TIMER1, LOG0_ON_EN);
  FLEXIO_TimerClock (TIMER2, LOG1_ON_EN_RST);
  FLEXIO_TimerClock (TIMER3, LOG0_ON_EN_RST);
  
  FLEXIO_TimerInc (TIMER1, INC_ALWAYS);
  FLEXIO_TimerInc (TIMER2, INC_PIN);
  FLEXIO_TimerInc (TIMER3, INC_TRIGGER);
  
  FLEXIO_TimerResets (TIMER1, RST_NEVER);
  FLEXIO_TimerResets (TIMER2, RST_PIN_OUT);
  FLEXIO_TimerResets (TIMER3, RST_TRIGGER_OUT);
  FLEXIO_TimerResets (TIMER1, RST_PIN_REDGE);
  FLEXIO_TimerResets (TIMER2, RST_TRIGGER_REDGE);
  FLEXIO_TimerResets (TIMER3, RST_TRIGGER_BOTHEDGES);
  
  FLEXIO_TimerDisablesOn (TIMER1, DIS_NEVER);
  FLEXIO_TimerDisablesOn (TIMER2, DIS_PREVIOUS_TIM_DIS);
  FLEXIO_TimerDisablesOn (TIMER3, DIS_ON_COMPARE);
  FLEXIO_TimerDisablesOn (TIMER1, DIS_ON_COMPARE_TRIGGER_LOW);
  FLEXIO_TimerDisablesOn (TIMER2, DIS_PIN_BOTHEDGES);
  FLEXIO_TimerDisablesOn (TIMER3, DIS_PIN_BOTHEDGES_TRIGGER_HIGH);  
  
  FLEXIO_TimerEnablesOn (TIMER1, EN_NEVER);
  FLEXIO_TimerEnablesOn (TIMER2, EN_PREVIOUS_TIM_DIS);
  FLEXIO_TimerEnablesOn (TIMER3, EN_TRIGGER_HIGH);
  FLEXIO_TimerEnablesOn (TIMER1, EN_TRIGGER_PIN_HIGH);
  FLEXIO_TimerEnablesOn (TIMER2, EN_PIN_REDGE);
  FLEXIO_TimerEnablesOn (TIMER3, EN_PIN_REDGE_TRIGGER_HIGH);    

  FLEXIO_TimerStopBit (TIMER2, STOP_DISABLED);
  FLEXIO_TimerStopBit (TIMER3, STOP_ON_COMPARE);   
  FLEXIO_TimerStopBit (TIMER2, STOP_ON_TIMER_DISABLED);
  FLEXIO_TimerStopBit (TIMER3, STOP_ON_COMPARE_TIMER_DISABLED);  
  
  FLEXIO_TimerStartBit (TIMER2, START_ENABLED);
  FLEXIO_TimerStartBit (TIMER3, START_DISABLED);
  
  FLEXIO_SetTimerCompareVal (TIMER0, 0x55);
  FLEXIO_SetTimerCompareVal (TIMER1, 0x55);
  FLEXIO_SetTimerCompareVal (TIMER2, 0x55);
  FLEXIO_SetTimerCompareVal (TIMER3, 0x55);
  
  FLEXIO_Init (FLEXIO_ENABLE_NORMAL_CONFIG, 1, flexio_callback);
  FLEXIO_SHIFTER_Init (SHIFTER0, FLEXIO_SHIFTER_CONFIG, 0xABCD);
  FLEXIO_TIMER_Init (TIMER0, FLEXIO_TIMER_CONFIG, 0x1235);