int0.c

来自「The purpose of this code is to demonstra」· C语言 代码 · 共 22 行

C
22
字号
//-----------------------------------------------------------------------------
//  File:    int0.c
//  Contents:  ISR for INT0# pin, used by slave to issue ZERO LENGTH PACKET
//            EZUSB FX Slave FIFO firmware to "pass-on" USB pkts to/from master.
//  Copyright (c) 2001 Cypress Semiconductor All rights reserved
//-----------------------------------------------------------------------------
#include "ezusb.h"
#include "ezregs.h"
#include "Fx.h"

extern BOOL zerolenpkt;

void int0( void ) interrupt 0
{ // processor vectors here when slave asserts zerolenpkt
  // the "using: keyword could make this more efficient
  zerolenpkt = 1;
  EX0 = 0;                      // disable INT0# pin ISR

  // foreground clears this flag and (re)enables ISR...
  // ...an idle system will service this event in ~8usec
  // ...a busy system could take ~20usec or so...
}

⌨️ 快捷键说明

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