00001 00002 /* 00003 ** Copyright (C) 2004 Russell Leighton 00004 ** 00005 ** This program is free software; you can redistribute it and/or modify 00006 ** it under the terms of the GNU General Public License as published by 00007 ** the Free Software Foundation; either version 2 of the License, or 00008 ** (at your option) any later version. 00009 ** 00010 ** This program is distributed in the hope that it will be useful, 00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 ** GNU General Public License for more details. 00014 ** 00015 ** You should have received a copy of the GNU General Public License 00016 ** along with this program; if not, write to the Free Software 00017 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 */ 00019 00020 00021 00022 00023 #ifndef __AWHANDLER_TIMER__ 00024 #define __AWHANDLER_TIMER__ 00025 00026 #include "monitor.h" 00027 00028 #include "wire.h" 00029 00070 /* 00071 00072 Changes: 00073 00074 02/09/04 Russell Leighton 00075 Port to handler 00076 00077 */ 00078 00082 typedef struct { 00083 00084 aw_event_sig_t 00085 interrupt; /* timer went off */ 00086 00087 } aw_timerhandler_events_t; 00088 00089 00093 typedef struct { 00094 00095 aw_handler_t 00096 handler_header; 00097 00098 aw_timerhandler_events_t 00099 events; 00100 00101 } aw_timerhandler_t ; 00102 00112 aw_timerhandler_t *aw_create_timerhandler(const aw_timerhandler_events_t *events, 00113 int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), 00114 int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), 00115 const aw_alarm_sched_t *sched, 00116 aw_logger_t *logger 00117 ); 00118 00123 void aw_free_timerhandler(aw_timerhandler_t *h); 00124 00125 00129 aw_handler_t *aw_wire_timerhandler(aw_wire_mkhandler_args_t *args); 00130 00131 #endif 00132