Justin Howard / Mbed 2 deprecated AdaFruit_RGBLCD

Dependencies:   AdaFruit_RGBLCDShield MCP23017 mbed RTclock

Dependents:   SX1276_GPS

Fork of MCP_test by Wim Huiskamp

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TempModule.h Source File

TempModule.h

00001 #ifndef __TEMPMODULE_H__
00002 #define __TEMPMODULE_H__
00003 
00004 #include "mbed.h"
00005 #include "module.h"
00006 
00007 class TempModule
00008     : public Module
00009 {
00010 public:
00011     TempModule
00012     (
00013         Serial &    in_cDisplay,
00014         I2C &       in_cI2C,
00015         uint8_t     in_nAddress
00016     );
00017     virtual ~TempModule();
00018     
00019     virtual bool    canRefresh() { return true; }
00020     virtual bool    isValid() { return m_bValid; }
00021     virtual void    show(bool in_bRefresh);
00022 
00023 protected:
00024     float       readTempC();
00025     uint16_t    read16(uint8_t in_nRegister);
00026     void        write16(uint8_t in_nRegister, uint16_t in_nValue);
00027 
00028     I2C &       m_cI2C;
00029     uint8_t     m_nAddress;
00030     bool        m_bValid;
00031 };
00032 
00033 #endif /* __TEMPMODULE_H__ */