pg_int.h

来自「一个移植到凌阳单片机spce061a上面的实时操作系统」· C头文件 代码 · 共 43 行

H
43
字号
///////////////////////////////////////////////////////////////
//
//
//   PGOS : A Portable,Configable Embedded System Kernel
//
//             
//
//   This is an open source project under GPL lincence  
//
//        Version 0.9.0 ---- Development Snopshot
//
//   File name : pg_int.h : Header file for interrupt module   
//   History :
//
//          2005-07-24  First build by X.K. @ PGOS Team  
//          
/////////////////////////////////////////////////////////////////


#ifndef PG_INT_H
#define PG_INT_H

#define PG_RATE  64
/////////////////////////////////////////////////////////////////
// Interrupt ON/OFF macros
// Note : These codes is only used in Intel X86 CPUs
//        If you want port to anther systems,
//        You must rewrite these codes .
/////////////////////////////////////////////////////////////////
#define pgos_int_disable()   __asm("IRQ OFF"); \
                             __asm("FIQ OFF")
#define pgos_int_enable()    __asm("IRQ ON");  \
                             __asm("FIQ ON")
////////////////////////////////////////////////////

// Interrupt API Interface
PGOS_STATUS  pgos_int_init() ;
VOID         pgos_int_rate( WORD freq ) ;
VOID         pgos_int_connect( BYTE  intnum, VOID ( *int_handler )() ) ;
// PGOS Interrupt Handler
VOID         pgos_timer_handler() ;

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?