summaryrefslogtreecommitdiff
path: root/drivers/led/issi/is31fl3736.c
diff options
context:
space:
mode:
authordonicrosby <doni.crosby1995@gmail.com>2021-11-01 19:40:01 -0400
committerGitHub <noreply@github.com>2021-11-02 10:40:01 +1100
commit0c725017638ec86011191bf835735fb6c569d298 (patch)
treed5c1076063ade21423de710ae9837b6edd16ae80 /drivers/led/issi/is31fl3736.c
parent7ae0f371cf55a589a4735098f52e722f579de41d (diff)
Enable de-ghosting for RGB/LED matrix on all ISSI LED drivers (#14508)
* Initial work for de-ghost enable * Dumb mistake with the redefine * Added Copywrite stuff on source files * Fixed whitespace errors * Added support for all ISSI LED drivers * Updated docs for support for ISSI LED driver pull-up pull-down * Applied clang format * Added 'boolean' flag to enable de-ghosting for the is31fl3731 IC * Fixed some of the grammer in the docs * Fixed comment placement and grammer of comment * Fixed whitespace errors from lint Co-authored-by: donicrosby <donicrosby1995@gmail.com>
Diffstat (limited to 'drivers/led/issi/is31fl3736.c')
-rw-r--r--drivers/led/issi/is31fl3736.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c
index 7dece1b1eb..dcaabba2ef 100644
--- a/drivers/led/issi/is31fl3736.c
+++ b/drivers/led/issi/is31fl3736.c
@@ -1,4 +1,5 @@
/* Copyright 2018 Jason Williams (Wilba)
+ * Copyright 2021 Doni Crosby
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -54,6 +55,14 @@
# define ISSI_PERSISTENCE 0
#endif
+#ifndef ISSI_SWPULLUP
+# define ISSI_SWPULLUP PUR_0R
+#endif
+
+#ifndef ISSI_CSPULLUP
+# define ISSI_CSPULLUP PUR_0R
+#endif
+
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20];
@@ -140,6 +149,10 @@ void IS31FL3736_init(uint8_t addr) {
// Select PG3
IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
+ // Set de-ghost pull-up resistors (SWx)
+ IS31FL3736_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP);
+ // Set de-ghost pull-down resistors (CSx)
+ IS31FL3736_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP);
// Set global current to maximum.
IS31FL3736_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF);
// Disable software shutdown.