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

📄 platformledsc.nc

📁 tinyos-2.x.rar
💻 NC
字号:
#include "hardware.h"

configuration PlatformLedsC {
  provides {
    interface GeneralIO as Led0;
    interface GeneralIO as Led1;
    interface GeneralIO as Led2;
  }
  uses {
    interface Init;
  }
}
implementation {
  components HplMsp430GeneralIOC as GeneralIOC;
  components new Msp430GpioC() as Led0Impl;
  components new Msp430GpioC() as Led1Impl;
  components new Msp430GpioC() as Led2Impl;
  components PlatformP;

  Init = PlatformP.LedsInit;

  Led0 = Led0Impl;
  Led0Impl -> GeneralIOC.Port40;

  Led1 = Led1Impl;
  Led1Impl -> GeneralIOC.Port43;

  Led2 = Led2Impl;
  Led2Impl -> GeneralIOC.Port47;
}

⌨️ 快捷键说明

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