~ubuntu-branches/ubuntu/lucid/avr-libc/lucid

« back to all changes in this revision

Viewing changes to include/interrupt.h

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2005-03-19 11:16:14 UTC
  • mfrom: (1.1.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050319111614-4g01s2ftv5x5nxf3
Tags: 1:1.2.3-3
* Added build depends on netpbm
* Added build depends on tetex-extra

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _INTERRUPT_H_
2
 
#define _INTERRUPT_H_
3
 
 
4
 
#include <io.h>
5
 
 
6
 
#define sei()  __asm__ __volatile__ ("sei" ::)
7
 
#define cli()  __asm__ __volatile__ ("cli" ::)
8
 
 
9
 
#ifdef __cplusplus
10
 
extern "C" {
11
 
#endif
12
 
 
13
 
extern inline void enable_external_int (unsigned char ints)
14
 
{
15
 
#ifdef EIMSK
16
 
  outp (ints, EIMSK);
17
 
#else
18
 
#ifdef GIMSK
19
 
  outp (ints, GIMSK);
20
 
#endif
21
 
#endif
22
 
}
23
 
 
24
 
extern inline void timer_enable_int (unsigned char ints)
25
 
{
26
 
#ifdef TIMSK
27
 
  outp (ints, TIMSK);
28
 
#endif
29
 
}
30
 
 
31
 
#ifdef __cplusplus
32
 
}
33
 
#endif
34
 
 
35
 
#endif