1188f24c2SXu Wang #ifndef WDT_DIAG288_H 2188f24c2SXu Wang #define WDT_DIAG288_H 3188f24c2SXu Wang 4a27bd6c7SMarkus Armbruster #include "hw/qdev-core.h" 5db1015e9SEduardo Habkost #include "qom/object.h" 6188f24c2SXu Wang 7188f24c2SXu Wang #define TYPE_WDT_DIAG288 "diag288" 8db1015e9SEduardo Habkost typedef struct DIAG288Class DIAG288Class; 9db1015e9SEduardo Habkost typedef struct DIAG288State DIAG288State; 10*8110fa1dSEduardo Habkost DECLARE_OBJ_CHECKERS(DIAG288State, DIAG288Class, 11*8110fa1dSEduardo Habkost DIAG288, TYPE_WDT_DIAG288) 12188f24c2SXu Wang 13188f24c2SXu Wang #define WDT_DIAG288_INIT 0 14188f24c2SXu Wang #define WDT_DIAG288_CHANGE 1 15188f24c2SXu Wang #define WDT_DIAG288_CANCEL 2 16188f24c2SXu Wang 17db1015e9SEduardo Habkost struct DIAG288State { 18188f24c2SXu Wang /*< private >*/ 19188f24c2SXu Wang DeviceState parent_obj; 20188f24c2SXu Wang QEMUTimer *timer; 21188f24c2SXu Wang bool enabled; 22188f24c2SXu Wang 23188f24c2SXu Wang /*< public >*/ 24db1015e9SEduardo Habkost }; 25188f24c2SXu Wang 26db1015e9SEduardo Habkost struct DIAG288Class { 27188f24c2SXu Wang /*< private >*/ 28188f24c2SXu Wang DeviceClass parent_class; 29188f24c2SXu Wang 30188f24c2SXu Wang /*< public >*/ 31188f24c2SXu Wang int (*handle_timer)(DIAG288State *dev, 32188f24c2SXu Wang uint64_t func, uint64_t timeout); 33db1015e9SEduardo Habkost }; 34188f24c2SXu Wang 35188f24c2SXu Wang #endif /* WDT_DIAG288_H */ 36