atm128gpiointerruptc.nc

来自「tinyos-2.0源代码!转载而已!要的尽管拿!」· NC 代码 · 共 41 行

NC
41
字号
/// $Id: Atm128GpioInterruptC.nc,v 1.1.2.2 2006/01/27 21:55:55 mturon Exp $/** * @author Phil Levis */generic module Atm128GpioInterruptC() {  provides interface GpioInterrupt as Interrupt;  uses interface HplAtm128Interrupt as Atm128Interrupt;}implementation {  error_t enable( bool rising ) {    atomic {      call Atm128Interrupt.edge( rising );      call Atm128Interrupt.enable();    }    return SUCCESS;  }  async command error_t Interrupt.enableRisingEdge() {    return enable( TRUE );  }  async command error_t Interrupt.enableFallingEdge() {    return enable( FALSE );  }  async command error_t Interrupt.disable() {    call Atm128Interrupt.disable();    return SUCCESS;  }  async event void Atm128Interrupt.fired() {    signal Interrupt.fired();  }}

⌨️ 快捷键说明

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