A compilation of some hardware sensors and their shared programming interfaces.

Committer:
mgottscho
Date:
Wed Mar 19 00:35:31 2014 +0000
Revision:
1:15396cab58d1
Parent:
0:8d34cc2ff388
Updated for most recent UtilityLib.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mgottscho 0:8d34cc2ff388 1 /* SleepableSensor.h
mgottscho 0:8d34cc2ff388 2 * Tested with mbed board: FRDM-KL46Z
mgottscho 0:8d34cc2ff388 3 * Author: Mark Gottscho
mgottscho 0:8d34cc2ff388 4 * mgottscho@ucla.edu
mgottscho 0:8d34cc2ff388 5 */
mgottscho 0:8d34cc2ff388 6
mgottscho 0:8d34cc2ff388 7 #ifndef SLEEPABLE_SENSOR_H
mgottscho 0:8d34cc2ff388 8 #define SLEEPABLE_SENSOR_H
mgottscho 0:8d34cc2ff388 9
mgottscho 0:8d34cc2ff388 10 class SleepableSensor {
mgottscho 0:8d34cc2ff388 11 public:
mgottscho 0:8d34cc2ff388 12 SleepableSensor();
mgottscho 0:8d34cc2ff388 13 ~SleepableSensor();
mgottscho 0:8d34cc2ff388 14
mgottscho 0:8d34cc2ff388 15 virtual void sleep() = 0;
mgottscho 0:8d34cc2ff388 16 virtual void wake() = 0;
mgottscho 0:8d34cc2ff388 17
mgottscho 0:8d34cc2ff388 18 bool isAsleep();
mgottscho 0:8d34cc2ff388 19
mgottscho 0:8d34cc2ff388 20 private:
mgottscho 0:8d34cc2ff388 21 bool __sleeping;
mgottscho 0:8d34cc2ff388 22 };
mgottscho 0:8d34cc2ff388 23
mgottscho 0:8d34cc2ff388 24 #endif