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

📄 blinkm.nc

📁 tinyos2.0版本驱动
💻 NC
字号:
// $Id: BlinkM.nc,v 1.4 2006/12/12 18:22:49 vlahan Exp $#include "Timer.h"module BlinkM{  uses interface Boot;  uses interface Leds;  uses interface Alarm<TMilli,uint32_t> as Alarm;}implementation{  enum { DELAY_MILLI = 512 };  event void Boot.booted()  {    atomic    {      call Leds.led1On();      call Alarm.start( DELAY_MILLI );    }  }  async event void Alarm.fired()  {    atomic    {      // this usage produces a periodic alarm with no frequency skew      call Alarm.startAt( call Alarm.getAlarm(), DELAY_MILLI );      call Leds.led0Toggle();    }  }}

⌨️ 快捷键说明

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