📄 countsleepradioc.nc
字号:
// $Id: CountSleepRadioC.nc,v 1.4 2005/09/15 00:37:10 jpolastre Exp $// @author Joe Polastreincludes CountMsg;/** CountSleepRadio wakes up every 2 seconds, starts the radio, * sends a packet with the current count, and then immediately shuts off * the radio and UART via the GenericComm StdControl interface. * CountSleepRadio is *only* a transmitter, there is no reception ability * in this example application. */configuration CountSleepRadioC{}implementation{ components Main , CountSleepRadioM , TimerC , GenericComm as Comm , LedsC// HPLPowerManagement is only needed for AVR based platforms#ifdef __AVR__ , HPLPowerManagementM as PM#endif ;#ifdef __AVR__ CountSleepRadioM.PowerManagement -> PM; CountSleepRadioM.Enable -> PM.Enable;#endif Main.StdControl -> TimerC; Main.StdControl -> CountSleepRadioM; CountSleepRadioM.CommControl -> Comm; CountSleepRadioM.SendMsg -> Comm.SendMsg[AM_COUNTMSG]; CountSleepRadioM.Timer -> TimerC.Timer[unique("Timer")]; CountSleepRadioM.Leds -> LedsC.Leds;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -