1188f24c2SXu Wang #ifndef WDT_DIAG288_H 2188f24c2SXu Wang #define WDT_DIAG288_H 3188f24c2SXu Wang 4a27bd6c7SMarkus Armbruster #include "hw/qdev-core.h" 5*db1015e9SEduardo Habkost #include "qom/object.h" 6188f24c2SXu Wang 7188f24c2SXu Wang #define TYPE_WDT_DIAG288 "diag288" 8*db1015e9SEduardo Habkost typedef struct DIAG288Class DIAG288Class; 9*db1015e9SEduardo Habkost typedef struct DIAG288State DIAG288State; 10188f24c2SXu Wang #define DIAG288(obj) \ 11188f24c2SXu Wang OBJECT_CHECK(DIAG288State, (obj), TYPE_WDT_DIAG288) 12188f24c2SXu Wang #define DIAG288_CLASS(klass) \ 13188f24c2SXu Wang OBJECT_CLASS_CHECK(DIAG288Class, (klass), TYPE_WDT_DIAG288) 14188f24c2SXu Wang #define DIAG288_GET_CLASS(obj) \ 15188f24c2SXu Wang OBJECT_GET_CLASS(DIAG288Class, (obj), TYPE_WDT_DIAG288) 16188f24c2SXu Wang 17188f24c2SXu Wang #define WDT_DIAG288_INIT 0 18188f24c2SXu Wang #define WDT_DIAG288_CHANGE 1 19188f24c2SXu Wang #define WDT_DIAG288_CANCEL 2 20188f24c2SXu Wang 21*db1015e9SEduardo Habkost struct DIAG288State { 22188f24c2SXu Wang /*< private >*/ 23188f24c2SXu Wang DeviceState parent_obj; 24188f24c2SXu Wang QEMUTimer *timer; 25188f24c2SXu Wang bool enabled; 26188f24c2SXu Wang 27188f24c2SXu Wang /*< public >*/ 28*db1015e9SEduardo Habkost }; 29188f24c2SXu Wang 30*db1015e9SEduardo Habkost struct DIAG288Class { 31188f24c2SXu Wang /*< private >*/ 32188f24c2SXu Wang DeviceClass parent_class; 33188f24c2SXu Wang 34188f24c2SXu Wang /*< public >*/ 35188f24c2SXu Wang int (*handle_timer)(DIAG288State *dev, 36188f24c2SXu Wang uint64_t func, uint64_t timeout); 37*db1015e9SEduardo Habkost }; 38188f24c2SXu Wang 39188f24c2SXu Wang #endif /* WDT_DIAG288_H */ 40