#ifndef __WDT_H
#define __WDT_H
/******************************************************************************
 *
 *                  WDT PERIPHERAL LIBRARY HEADER FILE
 *
 ******************************************************************************
 * FileName:        wdt.h
 * Dependencies:    See include below
 * Processor:       PIC24
 * Compiler:        MPLAB C30
 * Company:         Microchip Technology, Inc.
 *
 * Software License Agreement
 * The software supplied herewith by Microchip Technology Incorporated
 * (the “Company”) for its PICmicro® Microcontroller is intended and
 * supplied to you, the Company’s customer, for use solely and
 * exclusively on Microchip PICmicro Microcontroller products. The
 * software is owned by the Company and/or its supplier, and is
 * protected under applicable copyright laws. All rights are reserved.
 * Any use in violation of the foregoing restrictions may subject the
 * user to criminal sanctions under applicable laws, as well as to
 * civil liability for the breach of the terms and conditions of this
 * license.
 *
 * THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
 * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
 * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
 * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
 *
 *****************************************************************************/

#include "Generic.h"
#include "PIC24F_periph_features.h"

typedef enum 
{
   WDT_DISABLE,
   WDT_ENABLE
}  WDT_STATE;


#ifdef _WDT
/* This macro returns 1 if Watchdog Timer timeout has occourred 
                      0 if Watchdog Timer timeout has no occourred  */
#define WDT_TimeOut_Occourred()               (unsigned char)(RCONbits.WDTO)


extern void EnableWDT(WDT_STATE) __attribute__ ((section (".libperi")));

#endif /* _WDT */

#endif /* __WDT_H */

