2 * Simulator of microcontrollers (sim.src/hwcl.h)
4 * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
28 /* Abstract hw element. It can be a timer, serial line or whatever */
30 #ifndef SIM_HWCL_HEADER
31 #define SIM_HWCL_HEADER
41 class cl_hw: public cl_guiobj
46 enum hw_cath cathegory;
51 cl_hw(class cl_uc *auc, enum hw_cath cath, int aid, char *aid_string);
54 virtual void adding(class cl_hw *new_hw) {}
55 virtual void added(class cl_hw *new_hw) {}
56 virtual t_mem read(class cl_mem *mem, t_addr addr);
57 virtual void write(class cl_mem *mem, t_addr addr, t_mem *val);
59 virtual int tick(int cycles);
60 virtual void print_info(class cl_console *con);
63 class cl_hws: public cl_list
66 cl_hws(void): cl_list(2, 2) {}
67 virtual t_index add(void *item);