X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=tos%2Fsensorboards%2Fmts300%2FMagConfigP.nc;fp=tos%2Fsensorboards%2Fmts300%2FMagConfigP.nc;h=6f44f72f14cc8fc28f6d47052bb06e19097ec01a;hb=41addd09d398313e24500239334bd68c599250f9;hp=0000000000000000000000000000000000000000;hpb=2ffa09f67a30cf3fa75de30b5078996dbf3dfeb6;p=tinyos-2.x.git diff --git a/tos/sensorboards/mts300/MagConfigP.nc b/tos/sensorboards/mts300/MagConfigP.nc new file mode 100644 index 00000000..6f44f72f --- /dev/null +++ b/tos/sensorboards/mts300/MagConfigP.nc @@ -0,0 +1,50 @@ +/* $Id$ + * Copyright (c) 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. + */ +/** + * Internal component for basicsb photodiode. Arbitrates access to the photo + * diode and automatically turns it on or off based on user requests. + * + * @author David Gay + */ + +#include "mts300.h" +#include "I2C.h" + +configuration MagConfigP { + provides { + interface Init; + interface StdControl; + interface Mag; + + interface Atm128AdcConfig as ConfigX; + interface Atm128AdcConfig as ConfigY; + interface ResourceConfigure as ResourceX; + interface ResourceConfigure as ResourceY; + } +} +implementation { + components MagP, MicaBusC, new Atm128I2CMasterC() as I2CPot; + + Init = MagP; + StdControl = MagP; + Mag = MagP; + + ConfigX = MagP.ConfigX; + ConfigY = MagP.ConfigY; + ResourceX = MagP.ResourceX; + ResourceY = MagP.ResourceY; + + MagP.I2CPacket -> I2CPot; + MagP.Resource -> I2CPot; + + MagP.MagPower -> MicaBusC.PW5; + MagP.MagAdcX -> MicaBusC.Adc6; + MagP.MagAdcY -> MicaBusC.Adc5; +}