Microchip® Advanced Software Framework

wdt_example.c File Reference

AVR MEGARF WDT driver example.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include "conf_board.h"

Enumerations

enum  wdt_example_state {
  START_OF_PROG = (0x01),
  WDT_MCU_RESET = (0x02),
  REFRESH_WDT = (0x03),
  WDT_RST = (0x04),
  WDT_INTERRUPT = (0x05),
  WDT_RST_INTERRUPT = (0x06),
  END_OF_PROG = (0x07),
  ERROR_STATE = (0x0F)
}
 

Functions

int main (void)
 Main function. More...
 
static void wdt_timer_callback (void)
 Interrupt callback for wdt timer overflow interrupt Change the state when the interrupt is triggered. More...
 

Variables

enum wdt_example_state state_flag
 Global variables not initialized. More...
 

brief States of the example.

Enumerator
START_OF_PROG 
WDT_MCU_RESET 
REFRESH_WDT 
WDT_RST 
WDT_INTERRUPT 
WDT_RST_INTERRUPT 
END_OF_PROG 
ERROR_STATE 

static void wdt_timer_callback ( void  )
static

Interrupt callback for wdt timer overflow interrupt Change the state when the interrupt is triggered.

Parameters
none

References END_OF_PROG, and WDT_RST_INTERRUPT.

Referenced by main().

enum wdt_example_state state_flag

Global variables not initialized.