example project to explain how to write a class library
Diff: test_LM75B.h
- Revision:
- 1:239684cd8ae9
- Parent:
- 0:6ecb302da815
- Child:
- 2:bd3146b39577
- Child:
- 4:c372135e7d0c
--- a/test_LM75B.h Mon Nov 03 00:06:50 2014 +0000 +++ b/test_LM75B.h Mon Nov 03 00:10:48 2014 +0000 @@ -12,10 +12,12 @@ class test_LM75B { public: - test_LM75B( PinName sda, PinName scl ); + test_LM75B( PinName sda, PinName scl, char address = ADDRESS_LM75B ); ~test_LM75B(); - void init( void ); - float read( void ); + void init( void ); + float read( void ); + operator float( void ); private: I2C i2c; + char adr; };