micabusc.nc

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

NC
61
字号
// $Id: MicaBusC.nc,v 1.1.2.1 2006/02/01 16:43:58 idgay Exp $/* * Copyright (c) 2005-2006 Intel Corporation * All rights reserved. * * This file is distributed under the terms in the attached INTEL-LICENSE      * file. If you do not find these files, copies can be found by writing to * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,  * 94704.  Attention:  Intel License Inquiry. *//** * A simplistic beginning to providing a standard interface to the mica-family * 51-pin bus. Just provides the PW0-PW7 digital I/O pins and returns the * ADC channel number for the ADC pins. * @author David Gay */configuration MicaBusC {  provides {    interface GeneralIO as PW0;    interface GeneralIO as PW1;    interface GeneralIO as PW2;    interface GeneralIO as PW3;    interface GeneralIO as PW4;    interface GeneralIO as PW5;    interface GeneralIO as PW6;    interface GeneralIO as PW7;    /* Separate interfaces to allow inlining to occur */    interface MicaBusAdc as Adc0;    interface MicaBusAdc as Adc1;    interface MicaBusAdc as Adc2;    interface MicaBusAdc as Adc3;    interface MicaBusAdc as Adc4;    interface MicaBusAdc as Adc5;    interface MicaBusAdc as Adc6;    interface MicaBusAdc as Adc7;  }}implementation {  components HplAtm128GeneralIOC as Pins, MicaBusP;  PW0 = Pins.PortC0;  PW1 = Pins.PortC1;  PW2 = Pins.PortC2;  PW3 = Pins.PortC3;  PW4 = Pins.PortC4;  PW5 = Pins.PortC5;  PW6 = Pins.PortC6;  PW7 = Pins.PortC7;  Adc0 = MicaBusP.Adc0;  Adc1 = MicaBusP.Adc1;  Adc2 = MicaBusP.Adc2;  Adc3 = MicaBusP.Adc3;  Adc4 = MicaBusP.Adc4;  Adc5 = MicaBusP.Adc5;  Adc6 = MicaBusP.Adc6;  Adc7 = MicaBusP.Adc7;}

⌨️ 快捷键说明

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