Remove UHK_PCB_MAJOR_VERSION macro from the right firmware and default to v7.
This commit is contained in:
@@ -56,8 +56,6 @@ void InitPeripherials(void)
|
|||||||
ADC_Init();
|
ADC_Init();
|
||||||
InitI2c();
|
InitI2c();
|
||||||
InitTestLed();
|
InitTestLed();
|
||||||
#if UHK_PCB_MAJOR_VERSION >= 7
|
|
||||||
LedPwm_Init();
|
LedPwm_Init();
|
||||||
#endif
|
|
||||||
InitI2cWatchdog();
|
InitI2cWatchdog();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
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
|
|
||||||
.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},
|
||||||
@@ -35,24 +34,6 @@ key_matrix_t KeyMatrix = {
|
|||||||
{PORTC, GPIOC, kCLOCK_PortC, 0},
|
{PORTC, GPIOC, kCLOCK_PortC, 0},
|
||||||
{PORTD, GPIOD, kCLOCK_PortD, 5}
|
{PORTD, GPIOD, kCLOCK_PortD, 5}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
.cols = (key_matrix_pin_t[]){
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 5},
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 3},
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 16},
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 17},
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 18},
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 1},
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 0}
|
|
||||||
},
|
|
||||||
.rows = (key_matrix_pin_t[]){
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 12},
|
|
||||||
{PORTA, GPIOA, kCLOCK_PortA, 13},
|
|
||||||
{PORTC, GPIOC, kCLOCK_PortC, 0},
|
|
||||||
{PORTB, GPIOB, kCLOCK_PortB, 19},
|
|
||||||
{PORTD, GPIOD, kCLOCK_PortD, 6}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t CurrentKeyStates[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
|
uint8_t CurrentKeyStates[SLOT_COUNT][MAX_KEY_COUNT_PER_MODULE];
|
||||||
|
|||||||
@@ -7,21 +7,12 @@
|
|||||||
|
|
||||||
// Macros:
|
// Macros:
|
||||||
|
|
||||||
#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
|
||||||
#define MERGE_SENSOR_PIN 3
|
#define MERGE_SENSOR_PIN 3
|
||||||
#define MERGE_SENSOR_IRQ PORTB_IRQn
|
#define MERGE_SENSOR_IRQ PORTB_IRQn
|
||||||
#define MERGE_SENSOR_IRQ_HANDLER PORTB_IRQHandler
|
#define MERGE_SENSOR_IRQ_HANDLER PORTB_IRQHandler
|
||||||
#else
|
|
||||||
#define MERGE_SENSOR_GPIO GPIOB
|
|
||||||
#define MERGE_SENSOR_PORT PORTB
|
|
||||||
#define MERGE_SENSOR_CLOCK kCLOCK_PortB
|
|
||||||
#define MERGE_SENSOR_PIN 2
|
|
||||||
#define MERGE_SENSOR_IRQ PORTB_IRQn
|
|
||||||
#define MERGE_SENSOR_IRQ_HANDLER PORTB_IRQHandler
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MERGE_SENSOR_IS_MERGED !GPIO_ReadPinInput(MERGE_SENSOR_GPIO, MERGE_SENSOR_PIN)
|
#define MERGE_SENSOR_IS_MERGED !GPIO_ReadPinInput(MERGE_SENSOR_GPIO, MERGE_SENSOR_PIN)
|
||||||
|
|
||||||
|
|||||||
@@ -197,11 +197,9 @@ void applyConfig()
|
|||||||
|
|
||||||
void setLedPwm()
|
void setLedPwm()
|
||||||
{
|
{
|
||||||
#if UHK_PCB_MAJOR_VERSION >= 7
|
|
||||||
uint8_t brightnessPercent = GenericHidInBuffer[1];
|
uint8_t brightnessPercent = GenericHidInBuffer[1];
|
||||||
LedPwm_SetBrightness(brightnessPercent);
|
LedPwm_SetBrightness(brightnessPercent);
|
||||||
UhkModuleStates[0].ledPwmBrightness = brightnessPercent;
|
UhkModuleStates[0].ledPwmBrightness = brightnessPercent;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void getAdcValue(void)
|
void getAdcValue(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user