aboutsummaryrefslogtreecommitdiff
path: root/drivers/issi/is31fl3733.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/issi/is31fl3733.c')
-rw-r--r--drivers/issi/is31fl3733.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c
index e60f0e878..b913922b0 100644
--- a/drivers/issi/is31fl3733.c
+++ b/drivers/issi/is31fl3733.c
@@ -16,18 +16,9 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19#ifdef __AVR__
20# include <avr/interrupt.h>
21# include <avr/io.h>
22# include <util/delay.h>
23#else
24# include "wait.h"
25#endif
26
27#include <string.h>
28#include "i2c_master.h"
29#include "progmem.h"
30#include "is31fl3733.h" 19#include "is31fl3733.h"
20#include "i2c_master.h"
21#include "wait.h"
31 22
32// This is a 7-bit address, that gets left-shifted and bit 0 23// This is a 7-bit address, that gets left-shifted and bit 0
33// set to 0 for write, 1 for read (as per I2C protocol) 24// set to 0 for write, 1 for read (as per I2C protocol)
@@ -168,12 +159,8 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) {
168 // Disable software shutdown. 159 // Disable software shutdown.
169 IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01); 160 IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01);
170 161
171// Wait 10ms to ensure the device has woken up. 162 // Wait 10ms to ensure the device has woken up.
172#ifdef __AVR__
173 _delay_ms(10);
174#else
175 wait_ms(10); 163 wait_ms(10);
176#endif
177} 164}
178 165
179void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { 166void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {