Class module for NCP5623B I2C LED driver
Dependents: mDotEVBM2X MTDOT-EVB-LinkCheck-AL MTDOT-EVBDemo-DRH MTDOT_BOX_EVB_Blinky ... more
Revision 4:ae3ff403404a, committed 2016-10-17
- Comitter:
- Leon Lindenfelser
- Date:
- Mon Oct 17 08:42:14 2016 -0500
- Parent:
- 3:d8a72ac9972b
- Child:
- 5:c8b00cf49c70
- Commit message:
- Remove disable and enable of irqs around I2C accesses. Mbed5 takes care of peripheral access protection.
Changed in this revision
| NCP5623B.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/NCP5623B.cpp Mon Dec 21 10:50:05 2015 -0600
+++ b/NCP5623B.cpp Mon Oct 17 08:42:14 2016 -0500
@@ -37,9 +37,7 @@
{
uint8_t result = 0;
- __disable_irq();
_i2c->frequency(400000);
- __enable_irq();
// Turn off all LEDs and initialize all registers
result |= NCP5623B::writeRegister(NCP5623B::DIMDWNSET, 0x00);
@@ -130,9 +128,7 @@
buf[0] = reg | (data & NCP5623B::DATAMASK);
- __disable_irq();
result |= _i2c->write(_i2c_addr, buf, 1);
- __enable_irq();
return result;
}