Use >= relations instead of == for comparing UHK_PCB_MAJOR_VERSION.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
key_matrix_t keyMatrix = {
|
||||
.colNum = KEYBOARD_MATRIX_COLS_NUM,
|
||||
.rowNum = KEYBOARD_MATRIX_ROWS_NUM,
|
||||
#if UHK_PCB_MAJOR_VERSION == 7
|
||||
#if UHK_PCB_MAJOR_VERSION >= 7
|
||||
.cols = (key_matrix_pin_t[]){
|
||||
{PORTB, GPIOB, kCLOCK_PortB, 11},
|
||||
{PORTA, GPIOA, kCLOCK_PortA, 6},
|
||||
|
||||
@@ -49,7 +49,7 @@ void InitPeripherials(void)
|
||||
InitResetButton();
|
||||
InitMergeSensor();
|
||||
InitI2c();
|
||||
#if UHK_PCB_MAJOR_VERSION == 7
|
||||
#if UHK_PCB_MAJOR_VERSION >= 7
|
||||
LedPwm_Init();
|
||||
#endif
|
||||
InitTestLed(); // This function must not be called before LedPwm_Init() or else the UHK won't
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
key_matrix_t KeyMatrix = {
|
||||
.colNum = KEYBOARD_MATRIX_COLS_NUM,
|
||||
.rowNum = KEYBOARD_MATRIX_ROWS_NUM,
|
||||
#if UHK_PCB_MAJOR_VERSION == 7
|
||||
#if UHK_PCB_MAJOR_VERSION >= 7
|
||||
.cols = (key_matrix_pin_t[]){
|
||||
{PORTA, GPIOA, kCLOCK_PortA, 5},
|
||||
{PORTB, GPIOB, kCLOCK_PortB, 16},
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
// Macros:
|
||||
|
||||
#if UHK_PCB_MAJOR_VERSION == 7
|
||||
#if UHK_PCB_MAJOR_VERSION >= 7
|
||||
#define MERGE_SENSOR_GPIO GPIOB
|
||||
#define MERGE_SENSOR_PORT PORTB
|
||||
#define MERGE_SENSOR_CLOCK kCLOCK_PortB
|
||||
|
||||
@@ -207,7 +207,7 @@ void applyConfig()
|
||||
|
||||
void setLedPwm()
|
||||
{
|
||||
#if UHK_PCB_MAJOR_VERSION == 7
|
||||
#if UHK_PCB_MAJOR_VERSION >= 7
|
||||
uint8_t isRightKeyboardHalf = GenericHidInBuffer[1];
|
||||
uint8_t brightnessPercent = GenericHidInBuffer[2];
|
||||
if (isRightKeyboardHalf) {
|
||||
|
||||
Reference in New Issue
Block a user