File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 55 at http://mozilla.org/MPL/2.0/
66*/
77
8- #ifndef _ARUDINO_LTR381RGB_H_
9- #define _ARUDINO_LTR381RGB_H_
8+ #ifndef _ARUDINO_LTR381RGB_H_
9+ #define _ARUDINO_LTR381RGB_H_
1010
1111#include "LTR381RGB.h"
1212
Original file line number Diff line number Diff line change @@ -303,6 +303,10 @@ int LTR381RGBClass::getADCRate(int rate) {
303303 }
304304}
305305
306+ void LTR381RGBClass::setInteruptPersistence (int persistence) {
307+ writeRegister (LTR381RGB_INT_PST, (persistence << 4 ));
308+ }
309+
306310void LTR381RGBClass::enableALSInterrupt () {
307311 uint8_t res = readRegister (LTR381RGB_INT_CFG);
308312 writeRegister (LTR381RGB_INT_CFG, res | 0x04 );
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class LTR381RGBClass {
2929 void setTimeout (unsigned long timeout = 200 );
3030 int getADCResTime (int resolution);
3131 int getADCRate (int rate);
32+ void setInteruptPersistence (int persistence);
3233 void enableALSInterrupt ();
3334 void disableALSInterrupt ();
3435 void resetSW ();
You can’t perform that action at this time.
0 commit comments