You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
902 B
33 lines
902 B
#ifndef _SYS_INT8_CLOCK_TIMER___
|
|
#define _SYS_INT8_CLOCK_TIMER___
|
|
|
|
#include "stdafx.h"
|
|
#include "isr.h"
|
|
|
|
// bool init_sys_clock( void );
|
|
// DWORD get_sys_clock( void );
|
|
// void stop_sys_clock( void );
|
|
// #ifdef __LGS__DOS__STD__AFX__INCLUDED__
|
|
// #define IRQ8_INTERRUPT_TIMER 0x70 // The number of interrupt 8
|
|
// #define IRQ8_INTERRUPT_MASK 0xFE // The interrupt mask
|
|
// #define PICICR 0x20
|
|
// #define PICIMR 0x21
|
|
// #define EOI 0x20 // End Of Interrupt
|
|
// #endif
|
|
class SystemTimer: public CIsr {
|
|
private:
|
|
uint32_t m_nInteruptTimerValue;
|
|
uint32_t m_nSystemTimerValue;
|
|
bool m_bValid;
|
|
static SystemTimer *_instance;
|
|
protected:
|
|
SystemTimer();
|
|
public:
|
|
virtual ~SystemTimer();
|
|
virtual void OnISR( void );
|
|
SystemTimer *getInstance();
|
|
uint32_t getValue( void );
|
|
};
|
|
|
|
#endif
|
|
|