1
0
Fork 0

is31fl3733: driver naming cleanups (#21905)

This commit is contained in:
Ryan 2023-09-13 22:52:16 +10:00 committed by GitHub
parent 2d41443e6a
commit 1cbb5ae99e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 358 additions and 277 deletions

View file

@ -22,9 +22,40 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "progmem.h"
// ======== DEPRECATED DEFINES - DO NOT USE ========
#ifdef LED_DRIVER_COUNT
# define IS31FL3733_DRIVER_COUNT LED_DRIVER_COUNT
#endif
#ifdef ISSI_TIMEOUT
# define IS31FL3733_I2C_TIMEOUT ISSI_TIMEOUT
#endif
#ifdef ISSI_PERSISTENCE
# define IS31FL3733_I2C_PERSISTENCE ISSI_PERSISTENCE
#endif
#ifdef ISSI_PWM_FREQUENCY
# define IS31FL3733_PWM_FREQUENCY ISSI_PWM_FREQUENCY
#endif
#ifdef ISSI_SWPULLUP
# define IS31FL3733_SWPULLUP ISSI_SWPULLUP
#endif
#ifdef ISSI_CSPULLUP
# define IS31FL3733_CSPULLUP ISSI_CSPULLUP
#endif
#ifdef ISSI_GLOBALCURRENT
# define IS31FL3733_GLOBALCURRENT ISSI_GLOBALCURRENT
#endif
#define PUR_0R IS31FL3733_PUR_0R
#define PUR_05KR IS31FL3733_PUR_05KR
#define PUR_3KR IS31FL3733_PUR_3KR
#define PUR_4KR IS31FL3733_PUR_4KR
#define PUR_8KR IS31FL3733_PUR_8KR
#define PUR_16KR IS31FL3733_PUR_16KR
#define PUR_32KR IS31FL3733_PUR_32KR
// ========
typedef struct is31_led {
uint8_t driver : 2;
uint8_t v;
@ -48,13 +79,13 @@ void is31fl3733_set_led_control_register(uint8_t index, bool value);
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index);
#define PUR_0R 0x00 // No PUR resistor
#define PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
#define PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
#define PUR_4KR 0x04 // 4.0k Ohm resistor on all the time
#define PUR_8KR 0x05 // 8.0k Ohm resistor on all the time
#define PUR_16KR 0x06 // 16k Ohm resistor on all the time
#define PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
#define IS31FL3733_PUR_0R 0x00 // No PUR resistor
#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
#define IS31FL3733_PUR_4KR 0x04 // 4.0k Ohm resistor on all the time
#define IS31FL3733_PUR_8KR 0x05 // 8.0k Ohm resistor on all the time
#define IS31FL3733_PUR_16KR 0x06 // 16k Ohm resistor on all the time
#define IS31FL3733_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
#define A_1 0x00
#define A_2 0x01