A compilation of some hardware sensors and their shared programming interfaces.
SleepableSensor.cpp@1:15396cab58d1, 2014-03-19 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
mgottscho | 0:8d34cc2ff388 | 1 | /* SleepableSensor.cpp |
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 | #include "SleepableSensor.h" |
mgottscho | 0:8d34cc2ff388 | 8 | |
mgottscho | 0:8d34cc2ff388 | 9 | SleepableSensor::SleepableSensor() : |
mgottscho | 0:8d34cc2ff388 | 10 | __sleeping(false) |
mgottscho | 0:8d34cc2ff388 | 11 | { |
mgottscho | 0:8d34cc2ff388 | 12 | } |
mgottscho | 0:8d34cc2ff388 | 13 | |
mgottscho | 0:8d34cc2ff388 | 14 | SleepableSensor::~SleepableSensor() { } |
mgottscho | 0:8d34cc2ff388 | 15 | |
mgottscho | 0:8d34cc2ff388 | 16 | bool SleepableSensor::isAsleep() { |
mgottscho | 0:8d34cc2ff388 | 17 | return __sleeping; |
mgottscho | 0:8d34cc2ff388 | 18 | } |