154359Sroberto/* Copyright (c) 1995 Vixie Enterprises 254359Sroberto * 354359Sroberto * Permission to use, copy, modify, and distribute this software for any 454359Sroberto * purpose with or without fee is hereby granted, provided that the above 554359Sroberto * copyright notice and this permission notice appear in all copies, and that 654359Sroberto * the name of Vixie Enterprises not be used in advertising or publicity 754359Sroberto * pertaining to distribution of the document or software without specific, 854359Sroberto * written prior permission. 954359Sroberto * 1054359Sroberto * THE SOFTWARE IS PROVIDED "AS IS" AND VIXIE ENTERPRISES DISCLAIMS ALL 1154359Sroberto * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES 1254359Sroberto * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VIXIE ENTERPRISES 1354359Sroberto * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 1454359Sroberto * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 1554359Sroberto * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 1654359Sroberto * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 1754359Sroberto * SOFTWARE. 1854359Sroberto */ 1954359Sroberto 2054359Sroberto#ifndef _I8253_DEFINED 2154359Sroberto#define _I8253_DEFINED 2254359Sroberto 2354359Srobertotypedef union { 2454359Sroberto unsigned char i; 2554359Sroberto struct { 2654359Sroberto unsigned int bcd : 1; 2754359Sroberto#define i8253_binary 0 2854359Sroberto#define i8253_bcd 1 2954359Sroberto unsigned int mode : 3; 3054359Sroberto#define i8253_termcnt 0 3154359Sroberto#define i8253_oneshot 1 3254359Sroberto#define i8253_rategen 2 3354359Sroberto#define i8253_sqrwave 3 3454359Sroberto#define i8253_softstb 4 3554359Sroberto#define i8253_hardstb 5 3654359Sroberto unsigned int rl : 2; 3754359Sroberto#define i8253_latch 0 3854359Sroberto#define i8253_lsb 1 3954359Sroberto#define i8253_msb 2 4054359Sroberto#define i8253_lmb 3 4154359Sroberto unsigned int cntr : 2; 4254359Sroberto#define i8253_cntr_0 0 4354359Sroberto#define i8253_cntr_1 1 4454359Sroberto#define i8253_cntr_2 2 4554359Sroberto } s; 4654359Sroberto} i8253_ctrl; 4754359Sroberto 4854359Sroberto#endif /*_I8253_DEFINED*/ 49