Erling Lindholm / Mbed 2 deprecated Homerling_WIZwiki-W7500

Dependencies:   SDFileSystem WIZnetInterface mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers readsensor.h Source File

readsensor.h

00001 /*
00002  * readsensor.h
00003  *
00004  * 
00005  */
00006 
00007 #ifndef READSENSOR_H
00008 #define READSENSOR_H
00009 
00010 #include "mbed.h"
00011 #include <stdint.h>
00012 
00013 #include "readsensor.h"
00014 
00015 class ReadSensor {
00016     
00017 public:
00018      ReadSensor(PinName pin);
00019      ~ReadSensor();
00020 
00021     /** Create sensor object
00022      *
00023      */
00024     
00025 //    virtual int sensor_initialize();
00026 //    virtual int sensor_status();
00027 //    virtual int sensor_read(uint8_t * buffer, uint64_t block_number);
00028       int readData();
00029       int readPower();
00030  
00031 private:
00032     time_t  _lastReadTime;
00033     float _lastTemperature;
00034     float _lastHumidity;
00035   
00036     PinName _pin;
00037     bool _firsttime;
00038 
00039   
00040     int initialise_sensor();
00041     
00042     int _read(uint8_t * buffer, uint32_t length);
00043 
00044 
00045 //    DigitalOut _cs;
00046 };
00047 
00048 #endif