watchdog-timer-realtek-amebad  2.1.0
watchdog-timer-realtek-amebad
watchdog_timer_realtek_AmebaD_configuration.h
Go to the documentation of this file.
1 /*
2  * C
3  *
4  * Copyright 2021-2022 MicroEJ Corp. All rights reserved.
5  * Use of this source code is governed by a BSD-style license that can be found with this software.
6  */
7 
8 #ifndef WATCHDOG_TIMER_REALTEK_AMEBAD_CONF_H
9 #define WATCHDOG_TIMER_REALTEK_AMEBAD_CONF_H
10 
19 #include <stdint.h>
20 
21 #ifdef __cplusplus
22  extern "C" {
23 #endif
24 
25 #error "This header must be customized with platform specific configuration. Remove this #error when done. This file is not modified when a new version of the CCO is installed."
26 
35 #define WATCHDOG_TIMER_REALTEK_AMEBAD_CONFIGURATION_VERSION (1)
36 
41 #ifndef WATCHDOG_TIMER_TIMEOUT_MS
42 #define WATCHDOG_TIMER_TIMEOUT_MS 30000 // ms
43 #endif
44 
52 #define WATCHDOG_TIMER_INTERRUPT_MODE 0
53 #define WATCHDOG_TIMER_RESET_MODE 1
54 
59 #ifndef WATCHDOG_TIMER_MODE
60 #define WATCHDOG_TIMER_MODE WATCHDOG_TIMER_RESET_MODE
61 #endif
62 
63 
64 #if WATCHDOG_TIMER_MODE == WATCHDOG_TIMER_INTERRUPT_MODE
65 
77 #error "Since you use the watchdog timer in interrupt mode, you have to implement the callback function <code>void watchdog_timer_irq_handler(uint32_t id)</code> for watchdog timeout interrupt. Remove this #error when done."
78 void watchdog_timer_irq_handler(uint32_t id);
79 
80 #endif // WATCHDOG_TIMER_MODE == WATCHDOG_TIMER_INTERRUPT_MODE
81 
82 
83 #ifdef __cplusplus
84  }
85 #endif
86 
87 #endif /* WATCHDOG_TIMER_REALTEK_AMEBAD_CONF_H */