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