1
0
Fork 0

Rename encoder pins defines (#24003)

This commit is contained in:
Ryan 2024-07-03 17:18:27 +10:00 committed by GitHub
parent 8471dcc563
commit bc0c69570b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 100 additions and 91 deletions

View file

@ -201,7 +201,7 @@ const rgb_matrix_f rgb_matrix_functions[6][2] = {
#ifdef ENCODER_ENABLE
static pin_t encoders_pad_a[] = ENCODERS_PAD_A;
static pin_t encoders_pad_a[] = ENCODER_A_PINS;
#define NUMBER_OF_ENCODERS ARRAY_SIZE(encoders_pad_a)
const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = {

View file

@ -49,12 +49,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Encoder support
#ifndef EXTRA_ENCODERS_ENABLE
#define ENCODERS_PAD_A { D2 }
#define ENCODERS_PAD_B { D6 }
#define ENCODER_A_PINS { D2 }
#define ENCODER_B_PINS { D6 }
#else
#ifdef OLED_ENABLE
#error Extra encoders cannot be enabled at the same time as the OLED Driver as they use the same pins.
#endif
#define ENCODERS_PAD_A { D2, D1, B0 }
#define ENCODERS_PAD_B { D6, B1, D0 }
#define ENCODER_A_PINS { D2, D1, B0 }
#define ENCODER_B_PINS { D6, B1, D0 }
#endif