#ifndef __AVR_WATCHDOG_H___
#define __AVR_WATCHDOG_H___
+#ifdef __cplusplus
+extern "C" {
+#endif
#include "sim_avr.h"
}
/* no WDP3, WDIE, WDIF in atmega128 */
+/* MCUSR is called MCUCSR in atmega128 */
#define AVR_WATCHDOG_DECLARE_128(_WDSR, _vec) \
.watchdog = {\
- .wdrf = AVR_IO_REGBIT(MCUSR, WDRF),\
+ .wdrf = AVR_IO_REGBIT(MCUCSR, WDRF),\
.wdce = AVR_IO_REGBIT(_WDSR, WDCE),\
.wde = AVR_IO_REGBIT(_WDSR, WDE),\
.wdp = { AVR_IO_REGBIT(_WDSR, WDP0),AVR_IO_REGBIT(_WDSR, WDP1),\
},\
}
+#ifdef __cplusplus
+};
+#endif
+
#endif /* __AVR_WATCHDOG_H___ */