#ifdef STM32
	#include <biwak/handler.hpp>
#endif

#define FREEZE_SEPARATE_HANDLER(handler) \
    extern "C" { void handler(void) \
    { while(1) asm("nop;\n"); } }



#define DUMMY_SEPARATE_HANDLER(handler) \
    extern "C" { void handler(void) __attribute__ ( ( interrupt, isr, used ) ); \
      void handler(void) \
         { return; } }

#define FREEZE_HANDLER(handler) FREEZE_SEPARATE_HANDLER(handler)
#define DUMMY_HANDLER(handler) DUMMY_SEPARATE_HANDLER(handler)


FREEZE_HANDLER(NMI_Handler);
FREEZE_HANDLER(HardFault_Handler);
FREEZE_HANDLER(MemManage_Handler);

FREEZE_HANDLER(BusFault_Handler);
FREEZE_HANDLER(UsageFault_Handler);
FREEZE_HANDLER(SVC_Handler);
FREEZE_HANDLER(DebugMon_Handler);
FREEZE_HANDLER(PendSV_Handler);
//FREEZE_HANDLER(SysTick_Handler);

FREEZE_HANDLER(WWDG_IRQHandler);
FREEZE_HANDLER(PVD_IRQHandler);
FREEZE_HANDLER(TAMP_STAMP_IRQHandler);
FREEZE_HANDLER(RTC_WKUP_IRQHandler);
FREEZE_HANDLER(FLASH_IRQHandler);
FREEZE_HANDLER(RCC_IRQHandler);
/*
FREEZE_HANDLER(EXTI0_IRQHandler);
FREEZE_HANDLER(EXTI1_IRQHandler);
FREEZE_HANDLER(EXTI2_TSC_IRQHandler);
FREEZE_HANDLER(EXTI3_IRQHandler);
FREEZE_HANDLER(EXTI4_IRQHandler);
*/
FREEZE_HANDLER(DMA1_Channel1_IRQHandler);
FREEZE_HANDLER(DMA1_Channel2_IRQHandler);
FREEZE_HANDLER(DMA1_Channel3_IRQHandler);
FREEZE_HANDLER(DMA1_Channel4_IRQHandler);
FREEZE_HANDLER(DMA1_Channel5_IRQHandler);
FREEZE_HANDLER(DMA1_Channel6_IRQHandler);
FREEZE_HANDLER(DMA1_Channel7_IRQHandler);
FREEZE_HANDLER(ADC1_2_IRQHandler);
FREEZE_HANDLER(CAN_TX_IRQHandler);
FREEZE_HANDLER(CAN_RX0_IRQHandler);
FREEZE_HANDLER(CAN_RX1_IRQHandler);
FREEZE_HANDLER(CAN_SCE_IRQHandler);
FREEZE_HANDLER(EXTI9_5_IRQHandler);
FREEZE_HANDLER(TIM1_BRK_TIM15_IRQHandler);
FREEZE_HANDLER(TIM1_UP_TIM16_IRQHandler);
FREEZE_HANDLER(TIM1_TRG_COM_TIM17_IRQHandler);
FREEZE_HANDLER(TIM1_CC_IRQHandler);
FREEZE_HANDLER(TIM2_IRQHandler);
//DUMMY_HANDLER(TIM3_IRQHandler);
FREEZE_HANDLER(I2C1_EV_IRQHandler);
FREEZE_HANDLER(I2C1_ER_IRQHandler);
FREEZE_HANDLER(SPI1_IRQHandler);
//FREEZE_HANDLER(EXTI15_10_IRQHandler);
FREEZE_HANDLER(RTC_Alarm_IRQHandler);
FREEZE_HANDLER(TIM6_DAC1_IRQHandler);
FREEZE_HANDLER(TIM7_DAC2_IRQHandler);
FREEZE_HANDLER(COMP2_IRQHandler);
FREEZE_HANDLER(COMP4_6_IRQHandler);

FREEZE_HANDLER( FPU_IRQHandler );
FREEZE_HANDLER( USB_LP_CAN1_RX0_IRQHandler );
FREEZE_HANDLER( USB_HP_CAN1_TX_IRQHandler );
FREEZE_HANDLER( USBWakeUp_IRQHandler );
FREEZE_HANDLER( USART3_IRQHandler  );

// STM32F0
FREEZE_HANDLER( USB_IRQHandler );
FREEZE_HANDLER( USART3_4_IRQHandler );
FREEZE_HANDLER( USART1_IRQHandler );
FREEZE_HANDLER( TSC_IRQHandler );
FREEZE_HANDLER( TIM7_IRQHandler );
FREEZE_HANDLER( TIM6_DAC_IRQHandler );
FREEZE_HANDLER( TIM1_BRK_UP_TRG_COM_IRQHandler );
FREEZE_HANDLER( TIM17_IRQHandler );
FREEZE_HANDLER( TIM16_IRQHandler );
FREEZE_HANDLER( TIM15_IRQHandler );
FREEZE_HANDLER( TIM14_IRQHandler );
FREEZE_HANDLER( SPI2_IRQHandler );
FREEZE_HANDLER( RTC_IRQHandler );
FREEZE_HANDLER( RCC_CRS_IRQHandler );
FREEZE_HANDLER( PVD_VDDIO2_IRQHandler );
FREEZE_HANDLER( I2C2_IRQHandler );
FREEZE_HANDLER( I2C1_IRQHandler );


//---fin----------------------------------------------------------------------
