Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HYBRYD2018_IZU_ROCKET Hybrid_IZU2019
Revision 4:c1e82279b4bb, committed 2019-02-26
- Comitter:
- Okamoto009
- Date:
- Tue Feb 26 12:11:14 2019 +0000
- Parent:
- 3:f62d7ea19cbb
- Commit message:
- define name change
Changed in this revision
TSL2561.cpp | Show annotated file Show diff for this revision Revisions of this file |
TSL2561.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r f62d7ea19cbb -r c1e82279b4bb TSL2561.cpp --- a/TSL2561.cpp Sat Jan 12 17:05:34 2019 +0000 +++ b/TSL2561.cpp Tue Feb 26 12:11:14 2019 +0000 @@ -5,13 +5,13 @@ myTSL2561::myTSL2561(I2C &i2cBus, AD0 celect){ i2c = &i2cBus; if(celect == AD0_LOW){ - _addr = SLV_ADDR_LOW; + _addr = TSL_SLV_ADDR_LOW; } else if(celect == AD0_HIGH){ - _addr = SLV_ADDR_HIGH; + _addr = TSL_SLV_ADDR_HIGH; } else{ - _addr = SLV_ADDR_OPEN; + _addr = TSL_SLV_ADDR_OPEN; } SLV_WRITE_TSL = _addr; SLV_READ_TSL = _addr | 1;
diff -r f62d7ea19cbb -r c1e82279b4bb TSL2561.h --- a/TSL2561.h Sat Jan 12 17:05:34 2019 +0000 +++ b/TSL2561.h Tue Feb 26 12:11:14 2019 +0000 @@ -1,9 +1,9 @@ #ifndef TSL2561_H #define TSL2561_H -#define SLV_ADDR_OPEN 0b01110010 -#define SLV_ADDR_LOW 0b01110010 -#define SLV_ADDR_HIGH 0b01001010 +#define TSL_SLV_ADDR_OPEN 0b01110010 +#define TSL_SLV_ADDR_LOW 0b01110010 +#define TSL_SLV_ADDR_HIGH 0b01001010 #define COMMAND 0xA0 #define CONTROL_REG 0x00