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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SleepableSensor.h Source File

SleepableSensor.h

00001 /* SleepableSensor.h
00002  * Tested with mbed board: FRDM-KL46Z
00003  * Author: Mark Gottscho
00004  * mgottscho@ucla.edu
00005  */
00006  
00007 #ifndef SLEEPABLE_SENSOR_H
00008 #define SLEEPABLE_SENSOR_H
00009 
00010 class SleepableSensor {
00011     public:
00012         SleepableSensor();
00013         ~SleepableSensor();
00014         
00015         virtual void sleep() = 0;
00016         virtual void wake() = 0;
00017         
00018         bool isAsleep();
00019         
00020     private:
00021         bool __sleeping;  
00022 };
00023 
00024 #endif