[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/imote2/tos/sensorboards/GenericSensorboard
GenericSensorboardDSPM.nc, NONE,
1.1 GenericSensorboardManagerM.nc, NONE,
1.1 QuickFilterQF4A512.nc, NONE, 1.1 QuickFilterQF4A512C.nc,
NONE, 1.1 QuickFilterQF4A512M.nc, NONE, 1.1 SensorboardC.nc,
NONE, 1.1 Mix.h, NONE, 1.1 calibrationFilter.h, NONE,
1.1 config.h, NONE, 1.1 sampleHeader.h, NONE,
1.1 sensorboard.h, NONE, 1.1
Lama Nachman
lnachman at users.sourceforge.net
Sun Mar 4 23:29:22 PST 2007
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/imote2/tos/sensorboards/Framework
SensorboardFrameworkC.nc, NONE, 1.1 SensorboardFrameworkM.nc,
NONE, 1.1 BoardManager.nc, 1.1, 1.2 ChannelManager.nc, 1.1,
1.2 ChannelManagerM.nc, 1.1, 1.2 ChannelParamsManagerM.nc, 1.1,
1.2 SensorData.nc, 1.1, 1.2 TriggerManager.nc, 1.1,
1.2 TriggerManagerM.nc, 1.1, 1.2 sensorTypes.h, 1.1, 1.2
- Next message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/imote2/tools
CoreDumpDecipher.pl, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/contrib/imote2/tos/sensorboards/GenericSensorboard
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv1178/GenericSensorboard
Added Files:
GenericSensorboardDSPM.nc GenericSensorboardManagerM.nc
QuickFilterQF4A512.nc QuickFilterQF4A512C.nc
QuickFilterQF4A512M.nc SensorboardC.nc Mix.h
calibrationFilter.h config.h sampleHeader.h sensorboard.h
Log Message:
Pushed out internal tree
--- NEW FILE: GenericSensorboardDSPM.nc ---
module BasicSensorboardDSPM{
provides {
interface StdControl;
interface BulkTxRx as ProcessedData;
interface DSPManager;
}
uses {
interface SSP;
interface BulkTxRx as AccelData;
interface PXA27XGPIOInt as RDYInterrupt;
}
}
implementation {
command result_t StdControl.init() {
return SUCCESS;
}
command result_t StdControl.start() {
return SUCCESS;
}
command result_t StdControl.stop() {
return SUCCESS;
}
command result_t ProcessedData.BulkTxRx(BulkTxRxBuffer_t *TxRxBuffer, uint16_t NumBytes){
return FAIL;
}
command result_t ProcessedData.BulkTransmit(uint8_t *TxBuffer, uint16_t NumBytes){
return FAIL;
}
command result_t ProcessedData.BulkReceive(uint8_t *RxBuffer, uint16_t NumBytes){
return FAIL;
}
async event uint8_t *AccelData.BulkReceiveDone(uint8_t *RxBuffer, uint16_t NumBytes){
return NULL;
}
async event uint8_t *AccelData.BulkTransmitDone(uint8_t *TxBuffer, uint16_t NumBytes){
return NULL;
}
async event BulkTxRxBuffer_t *AccelData.BulkTxRxDone(BulkTxRxBuffer_t *TxRxBuffer, uint16_t NumBytes){
return NULL;
}
}
--- NEW FILE: GenericSensorboardManagerM.nc ---
/*****
*
* This Module provides the basic sensorobard specific implementation of the BoardManager interface
*
*
*
*
*******/
module GenericSensorboardManagerM{
provides{
interface BoardManager;
interface BluSH_AppI as CalOffset;
interface BluSH_AppI as CalGain;
}
uses{
interface StdControl as AccelDataControl;
interface I2CBusSequence;
interface PMIC;
interface QuickFilterQF4A512;
interface Timer;
}
}
implementation{
#include "paramtask.h"
#include "pmic.h"
#define SLAVE_WRITE_ADDR 0x40
//we want to test out our code by first enabling all pins as outputs
// then toggling between 1's and 0's every 1's
//DO NOT MAKE THESE CONST!!!
i2c_op_t configSequence[] = {
{I2C_START,0,0},
{I2C_WRITE, SLAVE_WRITE_ADDR, 0},
{I2C_WRITE, 0x3, 0}, //write configuration register command byte
{I2C_END, 0x0, 0}, //after next write, send stop bit
{I2C_WRITE, 0x0, 0}, //write configuration register value
};
#define CONFIGSEQUENCESIZE (sizeof(configSequence)/sizeof(*configSequence))
i2c_op_t WriteZeros[] = {
{I2C_START,0,0},
{I2C_WRITE, SLAVE_WRITE_ADDR, 0},
{I2C_WRITE, 0x1, 0}, //write output port register register
{I2C_END, 0x0, 0}, //after next write, send stop bit
{I2C_WRITE, 0x0, 0}, //write output port value
};
#define WRITEZEROSSIZE (sizeof(WriteZeros)/sizeof(*WriteZeros))
i2c_op_t WriteOnes[] = {
{I2C_START,0,0},
{I2C_WRITE, SLAVE_WRITE_ADDR, 0},
{I2C_WRITE, 0x1, 0}, //write output port register register
{I2C_END, 0x0, 0}, //after next write, send stop bit
{I2C_WRITE, 0xFF, 0}, //write output port value
};
#define WRITEONESSIZE (sizeof(WriteOnes)/sizeof(*WriteOnes))
void signalEnableChannelsToBeSampledDone(uint32_t arg);
DEFINE_PARAMTASK(signalEnableChannelsToBeSampledDone);
typedef struct{
uint8_t numChannels;
uint8_t *channelList;
} channelList_t;
bool gConfigureDone = FALSE;
channelList_t gChannelList;
bool gChannelListInUse;
bool gCalibrateOffsetFlag;
uint8_t gCalibrateChannel;
bool gCalibrate;
void signalEnableChannelsToBeSampledDone(uint32_t arg){
channelList_t *pCL = (channelList_t *)arg;
assert(pCL->channelList);
assert(pCL->numChannels > 0);
signal BoardManager.enableChannelsToBeSampledDone(pCL->numChannels, pCL->channelList);
free(pCL->channelList);
pCL->channelList = NULL;
gChannelListInUse = FALSE;
}
command result_t BoardManager.enableChannelsToBeSampled(uint8_t numChannels, uint8_t *channelList){
int i;
bool bValidChannel = FALSE;
//chip comes up with everything in right state...only need to configure it as all outputs
for(i=0;i<numChannels;i++){
switch(channelList[i]){
case 1:
case 2:
case 3:
case 4:
bValidChannel = TRUE;
break;
default:
break;
}
}
if(bValidChannel == TRUE){
call PMIC.enableSBVoltage_High(FALSE, LDO_TRIM_3P2);
call PMIC.enableSBVoltage_High(TRUE, LDO_TRIM_3P2);
//save the channelList for later so that we can signal when we are told that the QFA has been initialized
assert(gChannelListInUse == FALSE);
gChannelList.numChannels = numChannels;
gChannelList.channelList = malloc(numChannels);
assert(gChannelList.channelList);
memcpy(gChannelList.channelList,channelList,numChannels);
gChannelListInUse = TRUE;
gCalibrate = FALSE;
//wait 10ms just to let the voltage change settle out
return call Timer.start(TIMER_ONE_SHOT, 10);
}
return SUCCESS;
}
event result_t Timer.fired(){
call I2CBusSequence.runI2CBusSequence(configSequence, CONFIGSEQUENCESIZE);
return SUCCESS;
}
event result_t QuickFilterQF4A512.initializeQF4A512Done(){
POST_PARAMTASK(signalEnableChannelsToBeSampledDone,&gChannelList);
return SUCCESS;
}
command result_t BoardManager.startDataChannels(uint8_t numChannels, uint8_t *channelList){
int i;
for(i=0;i<numChannels;i++){
switch(channelList[i]){
case 1: //this is the accelerometer
call AccelDataControl.start();
break;
default:
break;
}
}
return SUCCESS;
}
task void unknownI2CSequence(){
trace(DBG_USR1,"received runI2CBusSequenceDone for unknown I2C Sequence\r\n");
return;
}
task void I2CSequenceDone(){
trace(DBG_USR1,"Successfully reset QFA\r\n");
call AccelDataControl.init();
if(gCalibrate == TRUE){
call QuickFilterQF4A512.calibrateQF4A512(gCalibrateOffsetFlag, gCalibrateChannel);
}
else{
call QuickFilterQF4A512.initializeQF4A512();
}
return;
}
task void writeZerosTask(){
trace(DBG_USR1,"configured i2c expander for outputs...reseting QFA\r\n");
call I2CBusSequence.runI2CBusSequence(WriteZeros, WRITEZEROSSIZE);
}
task void writeOnesTask(){
trace(DBG_USR1,"Reset QFA....bringing out of reset\r\n");
call I2CBusSequence.runI2CBusSequence(WriteOnes, WRITEONESSIZE);
}
event void I2CBusSequence.runI2CBusSequenceDone(i2c_op_t *pOpsExecuted, uint8_t numOpsExecuted, result_t success){
if( (success == SUCCESS) && pOpsExecuted == configSequence){
gConfigureDone = TRUE;
post writeZerosTask();
}
else if( (success == SUCCESS) && pOpsExecuted == WriteZeros){
post writeOnesTask();
}
else if( (success == SUCCESS) && pOpsExecuted == WriteOnes){
post I2CSequenceDone();
}
else{
post unknownI2CSequence();
}
return;
}
command BluSH_result_t CalOffset.getName(char *buff, uint8_t len){
const char name[] = "CalOffset";
strcpy(buff,name);
return BLUSH_SUCCESS_DONE;
}
command BluSH_result_t CalOffset.callApp(char *cmdBuff, uint8_t cmdLen,
char *resBuff, uint8_t resLen){
uint32_t targetChannel;
if(strlen(cmdBuff) > strlen("CalOffset ")){
sscanf(cmdBuff,"CalOffset %d", &targetChannel);
trace(DBG_USR1,"Calibrating offset for channel %d\r\n", targetChannel);
#if 1
call QuickFilterQF4A512.calibrateQF4A512(TRUE, targetChannel);
#else
gCalibrateOffsetFlag = FALSE;
gCalibrateChannel = targetChannel;
gCalibrate = TRUE;
call PMIC.enableSBVoltage_High(FALSE, LDO_TRIM_3P2);
call PMIC.enableSBVoltage_High(TRUE, LDO_TRIM_3P2);
//wait 10ms just to let the voltage change settle out
return call Timer.start(TIMER_ONE_SHOT, 10);
#endif
}
else{
trace(DBG_USR1,"CalOffset targetChannel\r\n");
}
return BLUSH_SUCCESS_DONE;
}
command BluSH_result_t CalGain.getName(char *buff, uint8_t len){
const char name[] = "CalGain";
strcpy(buff,name);
return BLUSH_SUCCESS_DONE;
}
command BluSH_result_t CalGain.callApp(char *cmdBuff, uint8_t cmdLen,
char *resBuff, uint8_t resLen){
uint32_t targetChannel;
if(strlen(cmdBuff) > strlen("CalGain ")){
sscanf(cmdBuff,"CalGain %d", &targetChannel);
trace(DBG_USR1,"Calibrating gain for channel %d\r\n", targetChannel);
#if 1
call QuickFilterQF4A512.calibrateQF4A512(FALSE, targetChannel);
#else
gCalibrateOffsetFlag = FALSE;
gCalibrateChannel = targetChannel;
gCalibrate = TRUE;
call PMIC.enableSBVoltage_High(FALSE, LDO_TRIM_3P2);
call PMIC.enableSBVoltage_High(TRUE, LDO_TRIM_3P2);
//wait 10ms just to let the voltage change settle out
return call Timer.start(TIMER_ONE_SHOT, 10);
#endif
}
else{
trace(DBG_USR1,"CalGain targetChannel\r\n");
}
return BLUSH_SUCCESS_DONE;
}
}
--- NEW FILE: QuickFilterQF4A512.nc ---
interface QuickFilterQF4A512 {
command result_t initializeQF4A512();
event result_t initializeQF4A512Done();
command result_t calibrateQF4A512(bool offset, uint8_t channel);
}
--- NEW FILE: QuickFilterQF4A512C.nc ---
/**
*
*@author Robbie Adler
*
**/
configuration QuickFilterQF4A512C{
provides {
// interface DSPManager;
interface SensorData[uint8_t channel];
interface StdControl;
interface QuickFilterQF4A512;
}
}
implementation {
components QuickFilterQF4A512M as Data,
PXA27XGPIOIntC,
DVFSC,
LedsC,
BluSHC,
// NoDSPM as DSPM,
SSP1C as SSPC;
SensorData = Data.SensorData;
StdControl = Data.StdControl;
QuickFilterQF4A512 = Data.QuickFilterQF4A512;
Data.DVFS -> DVFSC;
Data.SSP ->SSPC.SSP;
Data.RawData -> SSPC.BulkTxRx;
Data.DRDYInterrupt -> PXA27XGPIOIntC.PXA27XGPIOInt[10];
Data.Leds->LedsC;
BluSHC.BluSH_AppI[unique("BluSH")] -> Data.ManualRead;
BluSHC.BluSH_AppI[unique("BluSH")] -> Data.ClearCal;
}
--- NEW FILE: QuickFilterQF4A512M.nc ---
module QuickFilterQF4A512M{
provides {
interface StdControl;
interface SensorData[uint8_t channel];
interface QuickFilterQF4A512;
interface BluSH_AppI as ManualRead;
interface BluSH_AppI as ClearCal;
}
uses {
interface SSP;
interface BulkTxRx as RawData;
interface PXA27XGPIOInt as DRDYInterrupt;
interface DVFS;
interface Leds;
}
}
implementation {
[...993 lines suppressed...]
gTotalCalCommands = 4;
//setup the EEPROM write so that we can commit later
//offset registers = 0x56-0x57 + (channel-1)*0x30;
configureEEPROMWrite(0x56+ (channel-1)*0x30, 0xF00 + (channel-1)*4, 4);
//explicitly disable the interrupt so that we don't get anything too early
call DRDYInterrupt.disable();
atomic{
gBulkTxRxBuffer.RxBuffer = gPrivateRxBuffer;
gBulkTxRxBuffer.TxBuffer = gPrivateTxBuffer;
}
CHANGE_STATE(Cal);
return BLUSH_SUCCESS_DONE;
}
}
--- NEW FILE: SensorboardC.nc ---
/**
*
*@author Robbie Adler
*
**/
configuration SensorboardC{
provides {
interface StdControl;
interface GenericSampling;
}
uses{
interface BufferManagement;
interface WriteData;
}
}
implementation {
components SensorboardFrameworkC,
QuickFilterQF4A512C as SensorDataC,
PMICC,
I2CBusSequenceC,
Main,
TimerC,
BluSHC,
GenericSensorboardManagerM as BoardManagerM;
StdControl = SensorboardFrameworkC;
GenericSampling = SensorboardFrameworkC;
BufferManagement = SensorboardFrameworkC;
WriteData = SensorboardFrameworkC;
SensorboardFrameworkC.BoardManager -> BoardManagerM;
BoardManagerM.AccelDataControl -> SensorDataC;
BoardManagerM.I2CBusSequence -> I2CBusSequenceC;
BoardManagerM.PMIC -> PMICC;
BoardManagerM.QuickFilterQF4A512 -> SensorDataC.QuickFilterQF4A512;
BoardManagerM.Timer -> TimerC.Timer[unique("Timer")];
BluSHC.BluSH_AppI[unique("BluSH")] -> BoardManagerM.CalOffset;
BluSHC.BluSH_AppI[unique("BluSH")] -> BoardManagerM.CalGain;
//data channel components get wired into the parameterized
//SensorData interface instance that corresponds to their
//data channel #. Typically, SensorData[0] will be wired into
//a dummyData Component, but this is usage defined.
SensorboardFrameworkC.SensorData[1] -> SensorDataC.SensorData[0];
SensorboardFrameworkC.SensorData[2] -> SensorDataC.SensorData[1];
SensorboardFrameworkC.SensorData[3] -> SensorDataC.SensorData[2];
SensorboardFrameworkC.SensorData[4] -> SensorDataC.SensorData[3];
}
--- NEW FILE: Mix.h ---
//Copyright (c) 2006 Quickfilter Technologies, Inc
//
// Friday, February 23, 2007
//
//-------------------------------------------------------------------------
// Group 1 is Active
//-------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////
//
// Configuration Information:
//
//////////////////////////////////////////////////////////////////////////
//
// ChipType = QF4A512
//
// Export from file: C:\Program Files\Quickfilter Technologies\1klpf_4channels.qfp
//
// AutoConfig is not set
//
[...1054 lines suppressed...]
{ 0x0C34, 0x6F } ,
{ 0x0C35, 0x00 } ,
{ 0x0C36, 0xA7 } ,
{ 0x0C37, 0xF2 } ,
{ 0x0C38, 0x0F } ,
{ 0x0C39, 0xCC } ,
{ 0x0C3A, 0x32 } ,
{ 0x0C3B, 0x0F } ,
{ 0x0C3C, 0x47 } ,
{ 0x0C3D, 0x0E } ,
{ 0x0C3E, 0x00 } ,
{ 0x0C3F, 0xC7 } ,
{ 0x0C40, 0x87 } ,
{ 0x0C41, 0x02 } ,
{ 0x0C42, 0x67 } ,
{ 0x0C43, 0xF1 } ,
{ 0x0C44, 0x03 }
} ;
#endif
--- NEW FILE: calibrationFilter.h ---
//Copyright (c) 2006 Quickfilter Technologies, Inc
//
// Friday, February 23, 2007
//
//-------------------------------------------------------------------------
// Group 1 is Active
//-------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////
//
// Configuration Information:
//
//////////////////////////////////////////////////////////////////////////
//
// ChipType = QF4A512
//
// Export from file: C:\Program Files\Quickfilter Technologies\calibrationFilter.qfp
//
// AutoConfig is not set
//
[...3845 lines suppressed...]
{ 0x0EEF, 0x74 } ,
{ 0x0EF0, 0x00 } ,
{ 0x0EF1, 0xE5 } ,
{ 0x0EF2, 0x8E } ,
{ 0x0EF3, 0x00 } ,
{ 0x0EF4, 0xCD } ,
{ 0x0EF5, 0xA5 } ,
{ 0x0EF6, 0x00 } ,
{ 0x0EF7, 0x44 } ,
{ 0x0EF8, 0xB8 } ,
{ 0x0EF9, 0x00 } ,
{ 0x0EFA, 0x38 } ,
{ 0x0EFB, 0xC5 } ,
{ 0x0EFC, 0x00 } ,
{ 0x0EFD, 0xE4 } ,
{ 0x0EFE, 0xCB } ,
{ 0x0EFF, 0x00 }
} ;
#endif
--- NEW FILE: config.h ---
#ifndef __CONFIG_H__
#define __CONFIG_H__
//ONLY CONSTANTS MAY GO IN HERE!!!!
//total number of channels that the board exposes...be sure to include a "Fake" data channel if one exists for your board
#define TOTAL_CHANNELS (5)
//total number of data interfaces that this board utilizes for sampling
//each data interface is interlocked such that once sampling has been started
//on a data interface or a member of its simultaneous sampling group, another sampling instance may not be started until
//the current one is finished.
#define TOTAL_DATA_CHANNELS 5
//#define DOCHUNKING 1
#define CHUNKSIZE (100) //in samples
//#define DOPRETRIGGER
#define BLUSH_TRIGGER
#endif //__CONFIG_H__
--- NEW FILE: sampleHeader.h ---
#ifndef __SAMPLEHEADER_H__
#define __SAMPLEHEADER_H__
typedef struct {
uint8_t logicalNodeId; /* Intel logical nodeId, mote generating sample*/
uint8_t channelId; /* channelId generating the sample. This is VirtualChannel */
uint8_t acquisitionNum; /* Ordinal # of the acquisition for the query: e.g.1st, 2nd, 3rd */
uint8_t gSEFilterType; /* filler for header due to 32 bit boundary */
uint8_t sensorType; /* sensorType - Robbie creating enum */
uint8_t sampleWidth; /* bit width of sample data used for parsing sample body */
uint16_t queryGroupId; /* UniqueId of the query group being satisfied by this sample record */
uint8_t acquisitionCount; /* Total # of acquisitions needed to satisfy the query group */
uint8_t desiredUOM; /* Unit of Measure the user wants. See EngineeringUnits.h */
uint8_t outputUOM; /* Unit of Measure of the data on this sample record. See EngineeringUnits.h */
uint8_t engineeringUOM; /* Native UOM the sensor takes its readings in. See EngineeringUnits.h */
float conversionVal; /* Conversion of volts/EU to convert voltage reading the EU for the sensor */
float sensorZero; /* Zero stop of the sensor. */
uint32_t samplingRate; /* Rate at which samples are taken */
uint32_t numSamples; /* numSamples in this chunk */
uint32_t function; /* post processing function applied to data. Robbie creating function bitmap */
uint64_t microSecTimeStamp; /* micro-second accurate time stamp using time sync*/
uint32_t wallClockTimeStamp; /* second accurate wall clock stamp */
float ADCScale; /* Scaling used for Analog to Digital conversion */
float ADCOffset; /* Offset used for Analog to Digital conversion */
uint32_t sequenceID; /* unique number identifying the capture */
uint32_t sampleOffset; /* The offset of the 1st sample of this block within the total number of samples */
uint32_t totalSamples; /* total number of samples in an acquisition */
} sampleHeader_t __attribute__((packed, aligned(32)));
#endif //__SAMPLEHEADER_H__
--- NEW FILE: sensorboard.h ---
#ifndef __BASIC_SENSORBOARD_H__
#define __BASIC_SENSORBOARD_H__
/*
* Copyright (c) 2005 Intel Corporation
* All rights reserved.
*/
#include "config.h"
#include "channelParams.h"
#include "sensorTypes.h"
const char mySensorboardName[] = "GenericSensorboard";
#define MAX_SAMPLING_RATE (100000)
/*
* Supported sensor types
*/
//DO NOT CHANGE THESE DEFINITIONS. IF NEW ONES ARE NEEDED, ADD THEM!!!
#define SENSORTYPE_DC5Vpp ANALOG_SENSOR(SENSOR_ANALOG_DCCOUPLED, \
SENSOR_ANALOG_VOLTAGE, \
SENSOR_ANALOG_SINGLEENDED, \
SENSOR_ANALOG_RANGE_PLUSMINUS2P5V)
#define SENSORTYPE_DC10Vpp ANALOG_SENSOR(SENSOR_ANALOG_DCCOUPLED, \
SENSOR_ANALOG_VOLTAGE, \
SENSOR_ANALOG_SINGLEENDED, \
SENSOR_ANALOG_RANGE_PLUSMINUS5V)
#define SENSORTYPE_DC20Vpp ANALOG_SENSOR(SENSOR_ANALOG_DCCOUPLED, \
SENSOR_ANALOG_VOLTAGE, \
SENSOR_ANALOG_SINGLEENDED, \
SENSOR_ANALOG_RANGE_PLUSMINUS10V)
#define SENSORTYPE_AC5Vpp ANALOG_SENSOR(SENSOR_ANALOG_ACCOUPLED, \
SENSOR_ANALOG_VOLTAGE, \
SENSOR_ANALOG_SINGLEENDED, \
SENSOR_ANALOG_RANGE_PLUSMINUS2P5V)
#define SENSORTYPE_AC10Vpp ANALOG_SENSOR(SENSOR_ANALOG_ACCOUPLED, \
SENSOR_ANALOG_VOLTAGE, \
SENSOR_ANALOG_SINGLEENDED, \
SENSOR_ANALOG_RANGE_PLUSMINUS5V)
#define SENSORTYPE_AC20Vpp ANALOG_SENSOR(SENSOR_ANALOG_ACCOUPLED, \
SENSOR_ANALOG_VOLTAGE, \
SENSOR_ANALOG_SINGLEENDED, \
SENSOR_ANALOG_RANGE_PLUSMINUS10V)
#define SENSORTYPE_CURRENTLOOP ANALOG_SENSOR(SENSOR_ANALOG_DCCOUPLED, \
SENSOR_ANALOG_CURRENT, \
SENSOR_ANALOG_DIFFERENTIAL, \
SENSOR_ANALOG_RANGE_PLUS5V)
//THE FIRST NUMBER MUST MATCH THE TOTAL NUMBER OF ELEMENTS IN THE SECOND INITIALIZER FOR ALL ELEMENTS TO BE RECOGNIZED!
//first element in the comondFeatureList for a sensor is the PhysicalChannel that it maps to
const supportedCommonFeatureList32_t channel0Sensors = {1,0,{0}};
const supportedCommonFeatureList32_t channel1Sensors = {1,1,{SENSORTYPE_DC10Vpp}};
const supportedFeatureList8_t channel1Widths = {1,{16}};
const supportedCommonFeatureList32_t channel2Sensors = {1,1,{SENSORTYPE_DC10Vpp}};
const supportedFeatureList8_t channel2Widths = {1,{16}};
const supportedCommonFeatureList32_t channel3Sensors = {1,1,{SENSORTYPE_DC10Vpp}};
const supportedFeatureList8_t channel3Widths = {1,{16}};
const supportedCommonFeatureList32_t channel4Sensors = {1,1,{SENSORTYPE_DC10Vpp}};
const supportedFeatureList8_t channel4Widths = {1,{16}};
const supportedFeatureList8_t simulChannelGroup0 = {1,{0}};
const supportedFeatureList8_t simulChannelGroup1 = {4,{1,2,3,4}};
/*****************************
* Channel Capabilities Table
****************************/
const channelParam_t channelCapabilitiesTable[TOTAL_CHANNELS] = {
{MAX_SAMPLING_RATE, &channel0Sensors, NULL, NULL},
{MAX_SAMPLING_RATE, &channel1Sensors, NULL, &channel1Widths},
{MAX_SAMPLING_RATE, &channel2Sensors, NULL, &channel2Widths},
{MAX_SAMPLING_RATE, &channel3Sensors, NULL, &channel3Widths},
{MAX_SAMPLING_RATE, &channel4Sensors, NULL, &channel4Widths}};
/*****************************
* Data Channel Capabilities Table
****************************/
const dataChannelParam_t dataChannelCapabilitiesTable[TOTAL_DATA_CHANNELS] = {
{&simulChannelGroup0},
{&simulChannelGroup1}};
#endif //__SENSORBOARD_H__
- Previous message: [Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/imote2/tos/sensorboards/Framework
SensorboardFrameworkC.nc, NONE, 1.1 SensorboardFrameworkM.nc,
NONE, 1.1 BoardManager.nc, 1.1, 1.2 ChannelManager.nc, 1.1,
1.2 ChannelManagerM.nc, 1.1, 1.2 ChannelParamsManagerM.nc, 1.1,
1.2 SensorData.nc, 1.1, 1.2 TriggerManager.nc, 1.1,
1.2 TriggerManagerM.nc, 1.1, 1.2 sensorTypes.h, 1.1, 1.2
- Next message: [Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/imote2/tools
CoreDumpDecipher.pl, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-contrib-commits
mailing list