Drive the LED_PWM line of the left half via TPM which doesn't work yet for some reason. Add protocol command for setting the LED_PWM brightness of the left half. Expose UpdateUsbReports()

This commit is contained in:
László Monda
2017-01-13 21:43:47 +01:00
parent 0ded50b43a
commit 9ef9e5f734
10 changed files with 89 additions and 8 deletions

View File

@@ -207,8 +207,10 @@ void applyConfig()
void setLedPwm()
{
uint8_t brightnessPercent = GenericHidInBuffer[1];
#if UHK_PCB_MAJOR_VERSION == 7
uint8_t brightnessPercent = GenericHidInBuffer[1];
LedPwm_SetBrightness(brightnessPercent);
uint8_t data[] = {2, brightnessPercent};
I2cWrite(I2C_MAIN_BUS_BASEADDR, I2C_ADDRESS_LEFT_KEYBOARD_HALF, data, sizeof(data));
#endif
}