diff options
author | fauxpark <fauxpark@gmail.com> | 2019-12-30 05:21:58 +1100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-12-29 10:21:58 -0800 |
commit | 8af1501328711ba806785861b183786cb5cbb80a (patch) | |
tree | f31c64951d5c750038d30a2955911425d4cf6058 /drivers/issi/is31fl3737.c | |
parent | 25aaeb4f401fedee00e90e9fe27bdea5fed778d6 (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.c | 23 |
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]); } } } |