summaryrefslogtreecommitdiffstats
path: root/c/src/exec/itron/include/itronsys/intr.h
blob: 07f0c038f2109b6c3f0aec0709b778f322c3cd65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.OARcorp.com/rtems/license.html.
 *
 *  $Id$
 */

#ifndef __ITRON_INTERRUPT_h_
#define __ITRON_INTERRUPT_h_

#ifdef __cplusplus
extern "C" {
#endif

/*
 *  Define Interrupt (def_int) Structure
 */

typedef struct t_dint {
  ATR   intatr;   /* interrupt handler attributes */
  FP    inthdr;   /* interrupt handler address */
  /* additional information may be included depending on the implementation */
} T_DINT;

/*
 *  Interrupt Functions
 */

/*
 *  def_int - Define Interrupt Handler
 */

ER def_int(
  UINT dintno,
  T_DINT *pk_dint
);

/*
 *  ret_int - Return from Interrupt Handler
 */

void ret_int( void );

/*
 *  ret_wup - Return and Wakeup Task
 */

void ret_wup(
  ID tskid
);

/*
 *  loc_cpu - Lock CPU
 */

ER loc_cpu( void );

/*
 *  unl_cpu - Unlock CPU
 */

ER unl_cpu( void );

/*
 *  dis_int - Disable Interrupt
 */

ER dis_int(
  UINT eintno
);

/*
 *  ena_int - Enable Interrupt 
 */

ER ena_int(
  UINT eintno
);

/*
 *  chg_iXX - Change Interrupt Mask(Level or Priority)
 */

ER chg_iXX(
  UINT iXXXX
);

/*
 *  ref_iXX - Reference Interrupt Mask(Level or Priority)
 */

ER ref_iXX(
  UINT *p_iXXXX
);

#ifdef __cplusplus
}
#endif

#endif
/* end of include file */