diff --git a/drivers/issi/is31fl3218.h b/drivers/issi/is31fl3218.h
index a70cc1e7938..fa760da191d 100644
--- a/drivers/issi/is31fl3218.h
+++ b/drivers/issi/is31fl3218.h
@@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#pragma once
#include
diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c
index fad4676defd..bd3bb474602 100644
--- a/drivers/issi/is31fl3731-simple.c
+++ b/drivers/issi/is31fl3731-simple.c
@@ -16,21 +16,9 @@
* along with this program. If not, see .
*/
-#ifdef __AVR__
-# include
-# include
-# include
-#else
-# include "wait.h"
-#endif
-
-#include
-#include
-#include
#include "is31fl3731-simple.h"
#include "i2c_master.h"
-#include "progmem.h"
-#include "print.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,6 +144,7 @@ void IS31FL3731_init(uint8_t addr) {
// enable software shutdown
IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
+
// this delay was copied from other drivers, might not be needed
wait_ms(10);
diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h
index a223c351e88..85b458753cf 100644
--- a/drivers/issi/is31fl3731-simple.h
+++ b/drivers/issi/is31fl3731-simple.h
@@ -16,8 +16,10 @@
* along with this program. If not, see .
*/
-#ifndef IS31FL3731_DRIVER_H
-#define IS31FL3731_DRIVER_H
+#pragma once
+
+#include
+#include
typedef struct is31_led {
uint8_t driver : 2;
@@ -203,5 +205,3 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index);
#define C9_14 0xB1
#define C9_15 0xB2
#define C9_16 0xB3
-
-#endif // IS31FL3731_DRIVER_H
diff --git a/drivers/issi/is31fl3731.c b/drivers/issi/is31fl3731.c
index 0b6f3e985de..9f006b8174b 100644
--- a/drivers/issi/is31fl3731.c
+++ b/drivers/issi/is31fl3731.c
@@ -15,18 +15,9 @@
* along with this program. If not, see .
*/
-#ifdef __AVR__
-# include
-# include
-# include
-#else
-# include "wait.h"
-#endif
-
#include "is31fl3731.h"
-#include
#include "i2c_master.h"
-#include "progmem.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)
@@ -141,12 +132,9 @@ void IS31FL3731_init(uint8_t addr) {
// enable software shutdown
IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
-// this delay was copied from other drivers, might not be needed
-#ifdef __AVR__
- _delay_ms(10);
-#else
+
+ // this delay was copied from other drivers, might not be needed
wait_ms(10);
-#endif
// picture mode
IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
diff --git a/drivers/issi/is31fl3731.h b/drivers/issi/is31fl3731.h
index 6a7a45d8fff..19e8e6251f8 100644
--- a/drivers/issi/is31fl3731.h
+++ b/drivers/issi/is31fl3731.h
@@ -15,8 +15,7 @@
* along with this program. If not, see .
*/
-#ifndef IS31FL3731_DRIVER_H
-#define IS31FL3731_DRIVER_H
+#pragma once
#include
#include
@@ -207,5 +206,3 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index);
#define C9_14 0xB1
#define C9_15 0xB2
#define C9_16 0xB3
-
-#endif // IS31FL3731_DRIVER_H
diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c
index e60f0e878ea..b913922b07f 100644
--- a/drivers/issi/is31fl3733.c
+++ b/drivers/issi/is31fl3733.c
@@ -16,18 +16,9 @@
* along with this program. If not, see .
*/
-#ifdef __AVR__
-# include
-# include
-# include
-#else
-# include "wait.h"
-#endif
-
-#include
-#include "i2c_master.h"
-#include "progmem.h"
#include "is31fl3733.h"
+#include "i2c_master.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)
@@ -168,12 +159,8 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) {
// Disable software shutdown.
IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 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 IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h
index 4cf18673343..603d505a136 100644
--- a/drivers/issi/is31fl3733.h
+++ b/drivers/issi/is31fl3733.h
@@ -16,8 +16,7 @@
* along with this program. If not, see .
*/
-#ifndef IS31FL3733_DRIVER_H
-#define IS31FL3733_DRIVER_H
+#pragma once
#include
#include
@@ -250,5 +249,3 @@ void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index);
#define L_14 0xBD
#define L_15 0xBE
#define L_16 0xBF
-
-#endif // IS31FL3733_DRIVER_H
diff --git a/drivers/issi/is31fl3736.c b/drivers/issi/is31fl3736.c
index 754292425ec..9bd8fecfb2f 100644
--- a/drivers/issi/is31fl3736.c
+++ b/drivers/issi/is31fl3736.c
@@ -14,18 +14,9 @@
* along with this program. If not, see .
*/
-#ifdef __AVR__
-# include
-# include
-# include
-#else
-# include "wait.h"
-#endif
-
#include "is31fl3736.h"
-#include
#include "i2c_master.h"
-#include "progmem.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)
@@ -154,12 +145,8 @@ void IS31FL3736_init(uint8_t addr) {
// Disable software shutdown.
IS31FL3736_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 IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
@@ -263,7 +250,7 @@ void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2) {
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
IS31FL3736_write_pwm_buffer(addr1, g_pwm_buffer[0]);
- // IS31FL3736_write_pwm_buffer( addr2, g_pwm_buffer[1] );
+ // IS31FL3736_write_pwm_buffer(addr2, g_pwm_buffer[1]);
}
g_pwm_buffer_update_required = false;
}
@@ -275,7 +262,7 @@ void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
IS31FL3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]);
- // IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i] );
+ // IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i]);
}
}
}
diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c
index 4cc46272e24..37c5c58e42b 100644
--- a/drivers/issi/is31fl3737.c
+++ b/drivers/issi/is31fl3737.c
@@ -16,18 +16,9 @@
* along with this program. If not, see .
*/
-#ifdef __AVR__
-# include
-# include
-# include
-#else
-# include "wait.h"
-#endif
-
-#include
+#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]);
}
}
}
diff --git a/drivers/issi/is31fl3737.h b/drivers/issi/is31fl3737.h
index 2c2fb196413..a1d22817787 100644
--- a/drivers/issi/is31fl3737.h
+++ b/drivers/issi/is31fl3737.h
@@ -16,8 +16,7 @@
* along with this program. If not, see .
*/
-#ifndef IS31FL3737_DRIVER_H
-#define IS31FL3737_DRIVER_H
+#pragma once
#include
#include
@@ -202,5 +201,3 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2);
#define L_10 0xBB
#define L_11 0xBC
#define L_12 0xBD
-
-#endif // IS31FL3737_DRIVER_H