src/lq-SAMDutil.c
/**
 *	\brief Supply watchdog signal handler to be linked into SAMD vector table.
 *
 *  Note: The SAMD's vector/interrupt table is defined with weak references that can be
 *  overridden. The override is by symbol name so signature MUST match: "void WDT_Handler(void)"
 * 
 *  \param void [in] Must be referenced as void to fully match cortex handlers weak reference.
 *  \return Signal handlers return void.
 */
\brief Supply watchdog signal handler to be linked into SAMD vector table.
Note: The SAMD's vector/interrupt table is defined with weak references that can be
overridden. The override is by symbol name so signature MUST match: "void WDT_Handler(void)"

\param void [in] Must be referenced as void to fully match cortex handlers weak reference.
\return Signal handlers return void.
\ brief Supply watchdog signal handler to be linked into SAMD vector table . Note : The SAMD ' s vector / interrupt table is defined with weak references that can be overridden . The override is by symbol name so signature MUST match : " void WDT_Handler ( void ) " \ param void [ in ] Must be referenced as void to fully match cortex handlers weak reference . \ return Signal handlers return void .
void WDT_Handler(void)
{
    #if defined(__SAMD51__)
    WDT->CTRLA.bit.ENABLE = 0;              
    while (WDT->SYNCBUSY.reg);
    #else
    WDT->CTRL.bit.ENABLE = 0;               
    while (WDT->STATUS.bit.SYNCBUSY);       
    #endif
    WDT->INTFLAG.bit.EW = 1;                
}
void WDT_Handler ( void ) { #if defined ( __SAMD51__ ) WDT -> CTRLA . bit . ENABLE = 0 ; while ( WDT -> SYNCBUSY . reg ) ; #else WDT -> CTRL . bit . ENABLE = 0 ; while ( WDT -> STATUS . bit . SYNCBUSY ) ; #endif WDT -> INTFLAG . bit . EW = 1 ; }
\brief Supply watchdog signal handler to be linked into SAMD vector table.
\ brief Supply watchdog signal handler to be linked into SAMD vector table .
// ISR for watchdog early warning, DO NOT RENAME! // Disable watchdog // Disable watchdog // Sync CTRL write // Clear interrupt flag