]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Added support for the basicsb sensorboards for the mica based platforms
authorklueska <klueska>
Sat, 14 Jun 2008 19:27:25 +0000 (19:27 +0000)
committerklueska <klueska>
Sat, 14 Jun 2008 19:27:25 +0000 (19:27 +0000)
14 files changed:
tos/lib/tosthreads/chips/atm128/adc/BlockingAdcReadClientC.nc
tos/lib/tosthreads/chips/atm128/adc/BlockingAdcReadStreamClientC.nc
tos/lib/tosthreads/csystem/TosThreadApiC.nc
tos/lib/tosthreads/sensorboards/basicsb/BlockingPhotoC.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/BlockingPhotoStreamC.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/BlockingTempC.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/BlockingTempStreamC.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/CPhotoC.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/CPhotoP.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/CTempC.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/CTempP.nc [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/basicsb_sensors.h [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/tosthread_photo.h [new file with mode: 0644]
tos/lib/tosthreads/sensorboards/basicsb/tosthread_temp.h [new file with mode: 0644]

index ae4b76f7a3c77ce5d6713398ddb9cfabba46831f..e32775314eaf7b199e44881fd951c53c64c60680 100644 (file)
@@ -36,6 +36,6 @@ implementation {
 
   BlockingRead = BlockingAdcP.BlockingRead[ID];
   Atm128AdcConfig = BlockingAdcP.Config[ID];
-  BlockingAdcP.ReadResource[ID] -> Atm128AdcC.Resource[HAL_ID];
+  BlockingAdcP.ResourceRead[ID] -> Atm128AdcC.Resource[HAL_ID];
   ResourceConfigure = Atm128AdcC.ResourceConfigure[HAL_ID];
 }
index 214092bf8a55a9859a9a31e9247b8d79aab63ba0..9d88c714f662de11b291cc6fc3e6628cb1d0b3bc 100644 (file)
@@ -36,6 +36,6 @@ implementation {
 
   BlockingReadStream = BlockingAdcP.BlockingReadStream[ID];
   Atm128AdcConfig = BlockingAdcP.ConfigReadStream[ID];
-  BlockingAdcP.ReadStreamResource[ID] -> Atm128AdcC.Resource[HAL_ID];
+  BlockingAdcP.ResourceReadStream[ID] -> Atm128AdcC.Resource[HAL_ID];
   ResourceConfigure = Atm128AdcC.ResourceConfigure[HAL_ID];
 }
index d7c4d5123a20e8978be2b0b5deedb38e01fc48e7..e8fb8af2f31ddcb55ea4c6194781be02ee59a797 100644 (file)
@@ -68,7 +68,7 @@ implementation {
     components CLogStorageC;
   #endif 
   
-  //Telosb sensorboard specific.  Later need to find conditional way of adding this in
+  //Telosb sensorboard specific.
   #if defined(TOSTHREAD_HAMAMATSUS1087_H) || defined(TOSTHREAD_DYNAMIC_LOADER)
     components CHamamatsuS1087ParC;
   #endif
@@ -83,4 +83,12 @@ implementation {
   #if defined(TOSTHREAD_SINESENSOR_H) || defined(TOSTHREAD_DYNAMIC_LOADER)
     components CSineSensorC;
   #endif
+  
+  //Basicsb sensorboard specific
+  #if defined(TOSTHREAD_PHOTO_H) || defined(TOSTHREAD_DYNAMIC_LOADER)
+    components CPhotoC;
+  #endif
+  #if defined(TOSTHREAD_TEMP_H) || defined(TOSTHREAD_DYNAMIC_LOADER)
+    components CTempC;
+  #endif
 }
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/BlockingPhotoC.nc b/tos/lib/tosthreads/sensorboards/basicsb/BlockingPhotoC.nc
new file mode 100644 (file)
index 0000000..18ee6f1
--- /dev/null
@@ -0,0 +1,26 @@
+/* $Id$
+ * Copyright (c) 2006 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.
+ */
+/**
+ * Photodiode of the basicsb sensor board.
+ * 
+ * @author David Gay
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+
+generic configuration BlockingPhotoC() {
+  provides interface BlockingRead<uint16_t>;
+}
+implementation {
+  components new BlockingAdcReadClientC(), PhotoDeviceP;
+
+  BlockingRead = BlockingAdcReadClientC;
+  BlockingAdcReadClientC.Atm128AdcConfig -> PhotoDeviceP;
+  BlockingAdcReadClientC.ResourceConfigure -> PhotoDeviceP;
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/BlockingPhotoStreamC.nc b/tos/lib/tosthreads/sensorboards/basicsb/BlockingPhotoStreamC.nc
new file mode 100644 (file)
index 0000000..8a8e0c2
--- /dev/null
@@ -0,0 +1,26 @@
+/* $Id$
+ * Copyright (c) 2006 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.
+ */
+/**
+ * Photodiode of the basicsb sensor board.
+ * 
+ * @author David Gay
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+
+generic configuration BlockingPhotoStreamC() {
+  provides interface BlockingReadStream<uint16_t>;
+}
+implementation {
+  components PhotoDeviceP, new BlockingAdcReadStreamClientC();
+
+  BlockingReadStream = BlockingAdcReadStreamClientC;
+  BlockingAdcReadStreamClientC.Atm128AdcConfig -> PhotoDeviceP;
+  BlockingAdcReadStreamClientC.ResourceConfigure -> PhotoDeviceP;
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/BlockingTempC.nc b/tos/lib/tosthreads/sensorboards/basicsb/BlockingTempC.nc
new file mode 100644 (file)
index 0000000..cbdebb6
--- /dev/null
@@ -0,0 +1,25 @@
+/* $Id$
+ * Copyright (c) 2006 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.
+ */
+/**
+ * Thermistor of the basicsb sensor board.
+ * 
+ * @author David Gay
+ */
+
+generic configuration BlockingTempC() {
+  provides interface BlockingRead<uint16_t>;
+}
+implementation {
+  components new BlockingAdcReadClientC(), TempDeviceP;
+
+  BlockingRead = BlockingAdcReadClientC;
+  BlockingAdcReadClientC.Atm128AdcConfig -> TempDeviceP;
+  BlockingAdcReadClientC.ResourceConfigure -> TempDeviceP;
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/BlockingTempStreamC.nc b/tos/lib/tosthreads/sensorboards/basicsb/BlockingTempStreamC.nc
new file mode 100644 (file)
index 0000000..075ab97
--- /dev/null
@@ -0,0 +1,26 @@
+/* $Id$
+ * Copyright (c) 2006 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.
+ */
+/**
+ * Thermistor of the basicsb sensor board.
+ * 
+ * @author David Gay
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+
+generic configuration TempStreamC() {
+  provides interface BlockingReadStream<uint16_t>;
+}
+implementation {
+  components TempDeviceP, new BlockingAdcReadStreamClientC();
+
+  BlockingReadStream = BlockingAdcReadStreamClientC;
+  BlockingAdcReadStreamClientC.Atm128AdcConfig -> TempDeviceP;
+  BlockingAdcReadStreamClientC.ResourceConfigure -> TempDeviceP;
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/CPhotoC.nc b/tos/lib/tosthreads/sensorboards/basicsb/CPhotoC.nc
new file mode 100644 (file)
index 0000000..6631663
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2008 Stanford University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the
+ *   distribution.
+ * - Neither the name of the Stanford University nor the names of
+ *   its contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL STANFORD
+ * UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+
+configuration CPhotoC {}
+implementation {
+  components CPhotoP;
+  components new BlockingPhotoC();       
+  CPhotoP.BlockingRead -> BlockingPhotoC;
+  CPhotoP.BlockingReadStream -> BlockingPhotoC;
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/CPhotoP.nc b/tos/lib/tosthreads/sensorboards/basicsb/CPhotoP.nc
new file mode 100644 (file)
index 0000000..51aeeff
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2008 Stanford University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the
+ *   distribution.
+ * - Neither the name of the Stanford University nor the names of
+ *   its contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL STANFORD
+ * UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+
+module CPhotoP {
+  uses {
+    interface BlockingRead<uint16_t>;
+    interface BlockingReadStream<uint16_t>;
+  }
+}
+implementation {
+  error_t photo_read(uint16_t* val) @C() @spontaneous() {
+    return call BlockingRead.read(val);
+  }
+  error_t photo_readStream(uint32_t* usPeriod, uint16_t* buf, uint16_t count) @C() @spontaneous() {
+    return call BlockingReadStream.read(usPeriod, buf, count);
+  }
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/CTempC.nc b/tos/lib/tosthreads/sensorboards/basicsb/CTempC.nc
new file mode 100644 (file)
index 0000000..8079e7d
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2008 Stanford University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the
+ *   distribution.
+ * - Neither the name of the Stanford University nor the names of
+ *   its contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL STANFORD
+ * UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+
+configuration CTempC {}
+implementation {
+  components CTempP;
+  components new BlockingTempC();       
+  CTempP.BlockingRead -> BlockingTempC;
+  CTempP.BlockingReadStream -> BlockingTempC;
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/CTempP.nc b/tos/lib/tosthreads/sensorboards/basicsb/CTempP.nc
new file mode 100644 (file)
index 0000000..1bcc8d9
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2008 Stanford University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the
+ *   distribution.
+ * - Neither the name of the Stanford University nor the names of
+ *   its contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL STANFORD
+ * UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+
+module CTempP {
+  uses {
+    interface BlockingRead<uint16_t>;
+    interface BlockingReadStream<uint16_t>;
+  }
+}
+implementation {
+  error_t temp_read(uint16_t* val) @C() @spontaneous() {
+    return call BlockingRead.read(val);
+  }
+  error_t temp_readStream(uint32_t* usPeriod, uint16_t* buf, uint16_t count) @C() @spontaneous() {
+    return call BlockingReadStream.read(usPeriod, buf, count);
+  }
+}
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/basicsb_sensors.h b/tos/lib/tosthreads/sensorboards/basicsb/basicsb_sensors.h
new file mode 100644 (file)
index 0000000..ec3b13a
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2008 Stanford University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the
+ *   distribution.
+ * - Neither the name of the Stanford University nor the names of
+ *   its contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL STANFORD
+ * UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/**
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+  
+#ifndef BASICSB_SENSORS_H
+#define BASICSB_SENSORS_H
+
+#include "tosthread_photo.h"
+#include "tosthread_temp.h"
+
+#endif //BASICSB_SENSORS_H
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/tosthread_photo.h b/tos/lib/tosthreads/sensorboards/basicsb/tosthread_photo.h
new file mode 100644 (file)
index 0000000..f3508b5
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2008 Stanford University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the
+ *   distribution.
+ * - Neither the name of the Stanford University nor the names of
+ *   its contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL STANFORD
+ * UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/**
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+#ifndef TOSTHREAD_PHOTO_H
+#define TOSTHREAD_PHOTO_H
+
+#include "TinyError.h"
+
+extern error_t photo_read(uint16_t* val);
+extern error_t photo_readStream(uint32_t* usPeriod, uint16_t* buf, uint16_t count);
+
+#endif //TOSTHREAD_PHOTO_H
diff --git a/tos/lib/tosthreads/sensorboards/basicsb/tosthread_temp.h b/tos/lib/tosthreads/sensorboards/basicsb/tosthread_temp.h
new file mode 100644 (file)
index 0000000..adba25a
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2008 Stanford University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the
+ *   distribution.
+ * - Neither the name of the Stanford University nor the names of
+ *   its contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL STANFORD
+ * UNIVERSITY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/**
+ * @author Kevin Klues <klueska@cs.stanford.edu>
+ */
+#ifndef TOSTHREAD_TEMP_H
+#define TOSTHREAD_TEMP_H
+
+#include "TinyError.h"
+
+extern error_t temp_read(uint16_t* val);
+extern error_t temp_readStream(uint32_t* usPeriod, uint16_t* buf, uint16_t count);
+
+#endif //TOSTHREAD_TEMP_H