aboutsummaryrefslogtreecommitdiff
path: root/drivers/issi/is31fl3731.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/issi/is31fl3731.c')
-rw-r--r--drivers/issi/is31fl3731.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/issi/is31fl3731.c b/drivers/issi/is31fl3731.c
index 0b6f3e985..9f006b817 100644
--- a/drivers/issi/is31fl3731.c
+++ b/drivers/issi/is31fl3731.c
@@ -15,18 +15,9 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18#ifdef __AVR__
19# include <avr/interrupt.h>
20# include <avr/io.h>
21# include <util/delay.h>
22#else
23# include "wait.h"
24#endif
25
26#include "is31fl3731.h" 18#include "is31fl3731.h"
27#include <string.h>
28#include "i2c_master.h" 19#include "i2c_master.h"
29#include "progmem.h" 20#include "wait.h"
30 21
31// This is a 7-bit address, that gets left-shifted and bit 0 22// This is a 7-bit address, that gets left-shifted and bit 0
32// set to 0 for write, 1 for read (as per I2C protocol) 23// set to 0 for write, 1 for read (as per I2C protocol)
@@ -141,12 +132,9 @@ void IS31FL3731_init(uint8_t addr) {
141 132
142 // enable software shutdown 133 // enable software shutdown
143 IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); 134 IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
144// this delay was copied from other drivers, might not be needed 135
145#ifdef __AVR__ 136 // this delay was copied from other drivers, might not be needed
146 _delay_ms(10);
147#else
148 wait_ms(10); 137 wait_ms(10);
149#endif
150 138
151 // picture mode 139 // picture mode
152 IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); 140 IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);