is31fl3736: driver naming cleanups (#21903)
This commit is contained in:
parent
d36f73a431
commit
2d41443e6a
10 changed files with 126 additions and 86 deletions
|
@ -19,19 +19,37 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "progmem.h"
|
||||
|
||||
// Simple interface option.
|
||||
// If these aren't defined, just define them to make it compile
|
||||
|
||||
#ifndef DRIVER_COUNT
|
||||
# define DRIVER_COUNT 2
|
||||
// ======== DEPRECATED DEFINES - DO NOT USE ========
|
||||
#ifdef DRIVER_COUNT
|
||||
# define IS31FL3736_DRIVER_COUNT DRIVER_COUNT
|
||||
#endif
|
||||
#ifdef ISSI_TIMEOUT
|
||||
# define IS31FL3736_I2C_TIMEOUT ISSI_TIMEOUT
|
||||
#endif
|
||||
#ifdef ISSI_PERSISTENCE
|
||||
# define IS31FL3736_I2C_PERSISTENCE ISSI_PERSISTENCE
|
||||
#endif
|
||||
#ifdef ISSI_SWPULLUP
|
||||
# define IS31FL3736_SWPULLUP ISSI_SWPULLUP
|
||||
#endif
|
||||
#ifdef ISSI_CSPULLUP
|
||||
# define IS31FL3736_CSPULLUP ISSI_CSPULLUP
|
||||
#endif
|
||||
#ifdef ISSI_GLOBALCURRENT
|
||||
# define IS31FL3736_GLOBALCURRENT ISSI_GLOBALCURRENT
|
||||
#endif
|
||||
|
||||
#ifndef RGB_MATRIX_LED_COUNT
|
||||
# define RGB_MATRIX_LED_COUNT 96
|
||||
#endif
|
||||
#define PUR_0R IS31FL3736_PUR_0R
|
||||
#define PUR_05KR IS31FL3736_PUR_05KR
|
||||
#define PUR_1KR IS31FL3736_PUR_1KR
|
||||
#define PUR_2KR IS31FL3736_PUR_2KR
|
||||
#define PUR_4KR IS31FL3736_PUR_4KR
|
||||
#define PUR_8KR IS31FL3736_PUR_8KR
|
||||
#define PUR_16KR IS31FL3736_PUR_16KR
|
||||
#define PUR_32KR IS31FL3736_PUR_32KR
|
||||
// ========
|
||||
|
||||
typedef struct is31_led {
|
||||
uint8_t driver : 2;
|
||||
|
@ -62,14 +80,14 @@ void is31fl3736_mono_set_led_control_register(uint8_t index, bool enabled);
|
|||
void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index);
|
||||
void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index);
|
||||
|
||||
#define PUR_0R 0x00 // No PUR resistor
|
||||
#define PUR_05KR 0x01 // 0.5k Ohm resistor
|
||||
#define PUR_1KR 0x02 // 1.0k Ohm resistor
|
||||
#define PUR_2KR 0x03 // 2.0k Ohm resistor
|
||||
#define PUR_4KR 0x04 // 4.0k Ohm resistor
|
||||
#define PUR_8KR 0x05 // 8.0k Ohm resistor
|
||||
#define PUR_16KR 0x06 // 16k Ohm resistor
|
||||
#define PUR_32KR 0x07 // 32k Ohm resistor
|
||||
#define IS31FL3736_PUR_0R 0x00 // No PUR resistor
|
||||
#define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor
|
||||
#define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor
|
||||
#define IS31FL3736_PUR_2KR 0x03 // 2.0k Ohm resistor
|
||||
#define IS31FL3736_PUR_4KR 0x04 // 4.0k Ohm resistor
|
||||
#define IS31FL3736_PUR_8KR 0x05 // 8.0k Ohm resistor
|
||||
#define IS31FL3736_PUR_16KR 0x06 // 16k Ohm resistor
|
||||
#define IS31FL3736_PUR_32KR 0x07 // 32k Ohm resistor
|
||||
|
||||
#define A_1 0x00
|
||||
#define A_2 0x02
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue