Use >= relations instead of == for comparing UHK_PCB_MAJOR_VERSION.

This commit is contained in:
László Monda
2017-01-21 02:20:47 +01:00
parent bcab294256
commit d8761a95ba
5 changed files with 5 additions and 5 deletions

View File

@@ -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},

View File

@@ -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

View File

@@ -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},

View File

@@ -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

View File

@@ -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) {