Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

rtc.h

Go to the documentation of this file.
00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT!         -*- c++ -*-
00002 
00003 #ifndef rtc_h
00004 #define rtc_h
00005 
00006 //
00007 // INTERFACE definition follows 
00008 //
00009 
00010 
00011 class Rtc
00012 {
00013 private:
00014   Rtc();
00015   Rtc(const Rtc&);
00016 
00017 public:  
00018   // set up timer interrupt (~ 1ms)
00019   static void init(void);
00020   
00021   static void done(void);
00022   
00023   static void set_freq_slow(void);
00024   
00025   static void set_freq_normal(void);
00026   
00027   // acknowledge RTC interrupt
00028   static inline void ack_reset(void);
00029 
00030 private:  
00031   static inline unsigned char reg_read(unsigned char reg);
00032   
00033   static inline void reg_write(unsigned char reg, unsigned char val);
00034 };
00035 
00036 //
00037 // IMPLEMENTATION includes follow (for use by inline functions)
00038 //
00039 
00040 #include "pic.h"
00041 
00042 //
00043 // IMPLEMENTATION of inline functions (and needed classes)
00044 //
00045 
00046 
00047 
00048 // acknowledge RTC interrupt
00049 
00050 inline void
00051 Rtc::ack_reset(void)
00052 {
00053   // reset irq by reading the cmos port
00054   // do it fast because we are cli'd
00055   asm volatile ("movb $0xc, %%al\n\t"
00056                 "outb %%al,$0x70\n\t"
00057                 "outb %%al,$0x80\n\t"
00058                 "inb  $0x71,%%al\n\t" : : : "eax");
00059 
00060   // acknowledge interrupt
00061   Pic::acknowledge_locked(8);
00062 
00063   // reset irq by reading the cmos port
00064   // do it fast because we are cli'd
00065   asm volatile ("movb $0xc, %%al\n\t"
00066                 "outb %%al,$0x70\n\t"
00067                 "outb %%al,$0x80\n\t"
00068                 "inb  $0x71,%%al\n\t" : : : "eax");
00069 }
00070 
00071 #endif // rtc_h

Generated on Mon Sep 26 14:20:11 2005 for Fiasco by  doxygen 1.4.2