isl29001appc.nc

来自「tinyos2.0版本驱动」· NC 代码 · 共 41 行

NC
41
字号
/**
 * 本程序用于测试I2C驱动,传感器为ISL29001,CPU为atmel1281
 * @author Majy & Lizm
 * @date 2008/09/22
 * @latest modified by Lizm at 2008/09/24 09:26
 */


#include "ISL29001.h"


configuration ISL29001AppC
{
}
implementation
{
  components MainC, ISL29001C, LedsC;
  components new TimerMilliC() as Timer0;
  components new TimerMilliC() as Timer1;
  components new Atm128I2CMasterC() as I2CPot;
  components HplAtm128GeneralIOC;

  ISL29001C -> MainC.Boot;

  //components ActiveMessageC as AM;
  components SerialActiveMessageC as AM;
  ISL29001C.SerialControl -> AM;
  ISL29001C.Packet -> AM;
  ISL29001C.AMSend -> AM.AMSend[AM_ISL_TESTING];

  ISL29001C.I2CPacket -> I2CPot;
  ISL29001C.I2CResource -> I2CPot;

  ISL29001C.PD_Enable -> HplAtm128GeneralIOC.PortA3;

  ISL29001C.Timer0 -> Timer0;
  ISL29001C.Timer1 -> Timer1;
  ISL29001C.Leds -> LedsC;
}

⌨️ 快捷键说明

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