⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 int0.c

📁 The purpose of this code is to demonstrate how to utilize EZUSB FX GPIF interface.
💻 C
字号:
//-----------------------------------------------------------------------------
//  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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -