PWM the R_EXT of the LED driver using FTM.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "merge_sensor.h"
|
||||
#include "deserialize.h"
|
||||
#include "config_buffer.h"
|
||||
#include "led_pwm.h"
|
||||
|
||||
void setError(uint8_t error);
|
||||
void setGenericError();
|
||||
@@ -20,6 +21,7 @@ void readEeprom();
|
||||
void readMergeSensor();
|
||||
void uploadConfig();
|
||||
void applyConfig();
|
||||
void setLedPwm();
|
||||
|
||||
// Functions for setting error statuses
|
||||
|
||||
@@ -75,6 +77,9 @@ void usbProtocolHandler()
|
||||
case USB_COMMAND_APPLY_CONFIG:
|
||||
applyConfig();
|
||||
break;
|
||||
case USB_COMMAND_SET_LED_PWM:
|
||||
setLedPwm();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -199,3 +204,11 @@ void applyConfig()
|
||||
{
|
||||
deserialize_Layer(ConfigBuffer, 0);
|
||||
}
|
||||
|
||||
void setLedPwm()
|
||||
{
|
||||
uint8_t brightnessPercent = GenericHidInBuffer[1];
|
||||
#if UHK_PCB_MAJOR_VERSION == 7
|
||||
LedPwm_SetBrightness(brightnessPercent);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user