summaryrefslogtreecommitdiff
path: root/drivers/issi/is31fl3737.c
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-12-30 05:21:58 +1100
committerFlorian Didron <fdidron@users.noreply.github.com>2020-01-06 12:22:09 +0900
commit9d5e6c1c0a0826028e8302ea7479a1921cd1ff98 (patch)
tree7ad76c3dfabb32cdf2f6ebb25a87a29b0f8bda70 /drivers/issi/is31fl3737.c
parent20a2ebfeb9a9e0e535f93d3854219feb42402972 (diff)
Clean up ISSI driver includes (#7734)
* Clean up ISSI driver includes * Missed an endif
Diffstat (limited to 'drivers/issi/is31fl3737.c')
-rw-r--r--drivers/issi/is31fl3737.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c
index 4cc46272e2..37c5c58e42 100644
--- a/drivers/issi/is31fl3737.c
+++ b/drivers/issi/is31fl3737.c
@@ -16,18 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef __AVR__
-# include <avr/interrupt.h>
-# include <avr/io.h>
-# include <util/delay.h>
-#else
-# include "wait.h"
-#endif
-
-#include <string.h>
+#include "is31fl3737.h"
#include "i2c_master.h"
-#include "progmem.h"
-#include "rgb_matrix.h"
+#include "wait.h"
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
@@ -156,12 +147,8 @@ void IS31FL3737_init(uint8_t addr) {
// Disable software shutdown.
IS31FL3737_write_register(addr, ISSI_REG_CONFIGURATION, 0x01);
-// Wait 10ms to ensure the device has woken up.
-#ifdef __AVR__
- _delay_ms(10);
-#else
+ // Wait 10ms to ensure the device has woken up.
wait_ms(10);
-#endif
}
void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
@@ -217,7 +204,7 @@ void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
IS31FL3737_write_pwm_buffer(addr1, g_pwm_buffer[0]);
- // IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] );
+ // IS31FL3737_write_pwm_buffer(addr2, g_pwm_buffer[1]);
}
g_pwm_buffer_update_required = false;
}
@@ -229,7 +216,7 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]);
- // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] );
+ // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]);
}
}
}