Extract UsbCommand_GetAdcValue() to its own file.

This commit is contained in:
László Monda
2017-11-05 01:35:12 +01:00
parent 68f9aac883
commit 84ffe50dac
3 changed files with 18 additions and 6 deletions

View File

@@ -26,6 +26,7 @@
#include "usb_commands/usb_command_get_debug_info.h"
#include "usb_commands/usb_command_reenumerate.h"
#include "usb_commands/usb_command_set_test_led.h"
#include "usb_commands/usb_command_get_adc_value.h"
uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH];
@@ -55,11 +56,6 @@ void setLedPwm(void)
UhkModuleStates[UhkModuleDriverId_LeftKeyboardHalf].sourceVars.ledPwmBrightness = brightnessPercent;
}
void getAdcValue(void)
{
*(uint32_t*)(GenericHidOutBuffer+1) = ADC_Measure();
}
// The main protocol handler function
void UsbProtocolHandler(void)
@@ -88,7 +84,7 @@ void UsbProtocolHandler(void)
setLedPwm();
break;
case UsbCommandId_GetAdcValue:
getAdcValue();
UsbCommand_GetAdcValue();
break;
case UsbCommandId_LaunchEepromTransferLegacy:
UsbCommand_LaunchEepromTransferLegacy();