[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/scp-mac/apps Makeapps, NONE, 1.1 tstUartDebug.h, NONE, 1.1
Wei Ye
weiyeisi at users.sourceforge.net
Tue May 6 10:30:58 PDT 2008
- Previous message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/scp-mac LICENSE, NONE, 1.1 README, NONE, 1.1
- Next message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/scp-mac/apps/CsmaTest MacTest.nc, NONE, 1.1 Makefile, NONE, 1.1 README, NONE, 1.1 config.h, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/contrib/scp-mac/apps
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9805/scp-mac/apps
Added Files:
Makeapps tstUartDebug.h
Log Message:
scp-mac implementation from USC/ISI
--- NEW FILE: Makeapps ---
#
# Makefile to be included by each application's Makefile
# Author: Wei Ye
#
ifndef TOSDIR
$(error TOSDIR is not defined)
endif
ifndef COMMDIR
COMMDIR := ../../tos
$(warning COMMDIR is not defined, assuming $(COMMDIR).)
endif
ifndef INCLUDE
INCLUDE := -I.
endif
# now only mica2 and micaz are supported
PLATALL = mica2 micaz clean
PLATFORM = $(filter $(PLATALL), $(MAKECMDGOALS))
ifeq ($(PLATFORM),mica2)
# configuration for mica2
INCLUDE += -DPLATFORM_MICA2 \
-I$(COMMDIR)/platform/mica2 -I$(COMMDIR)/platform/avrmote
# select frequency (Hz) of the radio
#CFLAGS += -DCC1K_DEF_FREQ=426945000
#CFLAGS += -DCC1K_DEF_FREQ=439058000
else
ifeq ($(PLATFORM),micaz)
# configuration for micaz
$(warning MicaZ platform: CPU sleeping does not work, so it is disabled.)
INCLUDE += -DPLATFORM_MICAZ -DDISABLE_CPU_SLEEP\
-I$(COMMDIR)/platform/micaz -I$(COMMDIR)/platform/avrmote
endif
endif
INCLUDE += -I$(COMMDIR)/interfaces -I$(COMMDIR)/system
CFLAGS += $(INCLUDE)
#disable nesC warning messages
NESC_FLAGS = -Wall
# can't work with BNP, which sets fuse high byte to 0xd8.
# we need fuse high byte to be 0xd9
TINYOS_NP := NO_BNP
# set low fuse byte to 0xc4, so that the MCU will use the internal
# oscillator (at 8MHz) for fast wakeup.
ifdef MIB510
PROGRAMMER_EXTRA_FLAGS_MIB := --wr_fuse_l=c4
else
PROGRAMMER_EXTRA_FLAGS := --wr_fuse_l=c4
endif
ifeq ($(PLATFORM), mica2)
include $(TOSDIR)/../apps/Makerules
else
ifeq ($(PLATFORM), micaz)
include $(COMMDIR)/platform/micaz/MakeXbowlocal
include $(TOSDIR)/../tools/make/Makerules
else
ifeq ($(PLATFORM), clean)
include $(TOSDIR)/../apps/Makerules
endif
endif
endif
--- NEW FILE: tstUartDebug.h ---
/*
* Copyright (C) 2005 the University of Southern California.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition to releasing this program under the LGPL, the authors are
* willing to dual-license it under other terms. You may contact the authors
* of this project by writing to Wei Ye, USC/ISI, 4676 Admirality Way, Suite
* 1001, Marina del Rey, CA 90292, USA.
*/
/*
* Authors: Wei Ye
*
* This file defines debugging functions through UART
*/
#ifndef TST_UART_DEBUG_INCLUDED
#define TST_UART_DEUBG_INCLUDED
#ifdef TST_UART_DEBUG
// Debug by sending a byte through UART
#include "uartDebug.h"
static inline void tstUartDebug_init()
{
uartDebug_init();
}
static inline void tstUartDebug_byte(uint8_t byte)
{
uartDebug_txByte(byte);
}
#else
// UART debug is not enabled
static inline void tstUartDebug_init()
{
}
static inline void tstUartDebug_byte(uint8_t byte)
{
}
#endif // TST_UART_DEBUG
#endif // TST_UART_DEBUG_INCLUDED
- Previous message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/scp-mac LICENSE, NONE, 1.1 README, NONE, 1.1
- Next message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/scp-mac/apps/CsmaTest MacTest.nc, NONE, 1.1 Makefile, NONE, 1.1 README, NONE, 1.1 config.h, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-contrib-commits
mailing list