Last active
December 18, 2015 00:59
-
-
Save ahappyforest/5700560 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration YL69HumidityC { | |
provides { | |
interface SplitControl; | |
interface Read<uint16_t>; | |
} | |
} | |
implementation { | |
components YL69HumidityControlP as Control; | |
components YL69HumidityP as Device; | |
components MicaBusC; | |
components new AdcReadClientC() as Adc; | |
components new TimerMilliC() as WarmupTimer; // 保证设备有足够的启动时间 | |
// 1. Control | |
Control.Power -> MicaBusC.PW4 | |
Control.Delay -> WarmupTimer; | |
SplitControl = Control.SplitControl; | |
// 2. Device | |
Device.SoilHumidityAdc -> MicazBusC.Adc7; | |
Device.Atm128AdcConfig <- Adc; | |
Read = Adc.Read; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment