OpenCores
URL https://opencores.org/ocsvn/t48/t48/trunk

Subversion Repositories t48

[/] [t48/] [tags/] [rel_0_6_1_beta/] [sw/] [i8039emu/] [types.h] - Blame information for rev 256

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 49 arniml
/*
2
 * $Id: types.h,v 1.1.1.1 2004-04-09 19:20:53 arniml Exp $
3
 *
4
 */
5
 
6
#ifndef _TYPES_H_
7
#define _TYPES_H_
8
 
9
typedef unsigned char  UINT8;
10
typedef unsigned short UINT16;
11
typedef unsigned int   UINT32;
12
 
13
 
14
#define LSB_FIRST
15
 
16
/******************************************************************************
17
 * Union of UINT8, UINT16 and UINT32 in native endianess of the target
18
 * This is used to access bytes and words in a machine independent manner.
19
 * The upper bytes h2 and h3 normally contain zero (16 bit CPU cores)
20
 * thus PAIR.d can be used to pass arguments to the memory system
21
 * which expects 'int' really.
22
 ******************************************************************************/
23
typedef union {
24
#ifdef LSB_FIRST
25
        struct { UINT8 l,h,h2,h3; } b;
26
        struct { UINT16 l,h; } w;
27
#else
28
        struct { UINT8 h3,h2,h,l; } b;
29
        struct { UINT16 h,l; } w;
30
#endif
31
        UINT32 d;
32
}       PAIR;
33
 
34
 
35
/*************************************
36
 *
37
 *  Interrupt line constants
38
 *
39
 *************************************/
40
 
41
enum
42
{
43
    /* line states */
44
    CLEAR_LINE = 0,             /* clear (a fired, held or pulsed) line */
45
    ASSERT_LINE,                /* assert an interrupt immediately */
46
    HOLD_LINE,                  /* hold interrupt line until acknowledged */
47
    PULSE_LINE,                 /* pulse interrupt line for one instruction */
48
 
49
    /* internal flags (not for use by drivers!) */
50
    INTERNAL_CLEAR_LINE = 100 + CLEAR_LINE,
51
    INTERNAL_ASSERT_LINE = 100 + ASSERT_LINE,
52
 
53
    /* interrupt parameters */
54
    MAX_IRQ_LINES = 32+1,            /* maximum number of IRQ lines per CPU */
55
    IRQ_LINE_NMI = MAX_IRQ_LINES - 1 /* IRQ line for NMIs */
56
};
57
 
58
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.