From: idgay Date: Wed, 23 May 2007 21:58:08 +0000 (+0000) Subject: LocalTimeMilliC + msp430 support therefore X-Git-Tag: release_tools_1_2_4_1~172 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=93c7440cc4c26da55b415e2e23d673dd5839d6c4;p=tinyos-2.x.git LocalTimeMilliC + msp430 support therefore --- diff --git a/tos/chips/msp430/timer/HilTimerMilliC.nc b/tos/chips/msp430/timer/HilTimerMilliC.nc index caa2180a..9028414f 100644 --- a/tos/chips/msp430/timer/HilTimerMilliC.nc +++ b/tos/chips/msp430/timer/HilTimerMilliC.nc @@ -33,16 +33,21 @@ configuration HilTimerMilliC { provides interface Init; provides interface Timer as TimerMilli[ uint8_t num ]; + provides interface LocalTime; } implementation { components new AlarmMilli32C(); components new AlarmToTimerC(TMilli); components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI)); + components new CounterToLocalTimeC(TMilli); + components CounterMilli32C; Init = AlarmMilli32C; TimerMilli = VirtualizeTimerC; + LocalTime = CounterToLocalTimeC; VirtualizeTimerC.TimerFrom -> AlarmToTimerC; AlarmToTimerC.Alarm -> AlarmMilli32C; + CounterToLocalTimeC.Counter -> CounterMilli32C; } diff --git a/tos/system/LocalTimeMilliC.nc b/tos/system/LocalTimeMilliC.nc new file mode 100644 index 00000000..ae8d73db --- /dev/null +++ b/tos/system/LocalTimeMilliC.nc @@ -0,0 +1,27 @@ +/* $Id$ + * Copyright (c) 2007 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. + * + */ +/** + * Provide current time via the LocalTime interface. + * + * @author David Gay + */ + +#include "Timer.h" + +configuration LocalTimeMilliC { + provides interface LocalTime; +} +implementation +{ + components HilTimerMilliC; + + LocalTime = HilTimerMilliC; +}