1 /* 2 * i8255.h - Copyright (c) 2001, 2006, 2007 Olivier Poncet 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 #ifndef __GDEV_I8255_H__ 19 #define __GDEV_I8255_H__ 20 21 #include <dev/device.h> 22 23 G_BEGIN_DECLS 24 25 #define GDEV_TYPE_I8255 (gdev_i8255_get_type()) 26 #define GDEV_I8255(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GDEV_TYPE_I8255, GdevI8255)) 27 #define GDEV_I8255_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GDEV_TYPE_I8255, GdevI8255Class)) 28 #define GDEV_IS_I8255(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GDEV_TYPE_I8255)) 29 #define GDEV_IS_I8255_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GDEV_TYPE_I8255)) 30 #define GDEV_I8255_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GDEV_TYPE_I8255, GdevI8255Class)) 31 32 typedef struct _GdevI8255 GdevI8255; 33 typedef struct _GdevI8255Class GdevI8255Class; 34 35 struct _GdevI8255 { 36 GdevDevice device; 37 guint8 control; 38 guint8 port_a; 39 guint8 port_b; 40 guint8 port_c; 41 }; 42 43 struct _GdevI8255Class { 44 GdevDeviceClass parent_class; 45 }; 46 47 extern GType gdev_i8255_get_type (void); 48 extern GdevI8255 *gdev_i8255_new (void); 49 50 G_END_DECLS 51 52 #endif /* __GDEV_I8255_H__ */ 53