Rename get_module_properties.[ch] to get_module_property.[ch]. It seems that the header wasn't included in usb_protocol_handler.c possibly causing issues when using these commands.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
#include "fsl_common.h"
|
||||
#include "usb_commands/usb_command_get_module_properties.h"
|
||||
#include "usb_commands/usb_command_get_module_property.h"
|
||||
#include "usb_protocol_handler.h"
|
||||
#include "slot.h"
|
||||
#include "slave_drivers/uhk_module_driver.h"
|
||||
|
||||
void UsbCommand_GetModuleProperties()
|
||||
void UsbCommand_GetModuleProperty()
|
||||
{
|
||||
slot_t slotId = GetUsbRxBufferUint8(1);
|
||||
|
||||
if (!IS_VALID_MODULE_SLOT(slotId)) {
|
||||
SetUsbTxBufferUint8(0, UsbStatusCode_ReadConfig_InvalidModuleSlotId);
|
||||
SetUsbTxBufferUint8(0, UsbStatusCode_GetModuleProperty_InvalidModuleSlotId);
|
||||
}
|
||||
|
||||
uint8_t moduleDriverId = SLOT_ID_TO_UHK_MODULE_DRIVER_ID(slotId);
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
void UsbCommand_GetModuleProperties();
|
||||
void UsbCommand_GetModuleProperty();
|
||||
|
||||
// Typedefs:
|
||||
|
||||
typedef enum {
|
||||
UsbStatusCode_ReadConfig_InvalidModuleSlotId = 2,
|
||||
UsbStatusCode_GetModuleProperty_InvalidModuleSlotId = 2,
|
||||
} usb_status_code_get_module_properties_t;
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "usb_protocol_handler.h"
|
||||
#include "buffer.h"
|
||||
#include "usb_commands/usb_command_get_property.h"
|
||||
#include "usb_commands/usb_command_get_module_property.h"
|
||||
#include "usb_commands/usb_command_reenumerate.h"
|
||||
#include "usb_commands/usb_command_set_test_led.h"
|
||||
#include "usb_commands/usb_command_write_config.h"
|
||||
@@ -61,8 +62,8 @@ void UsbProtocolHandler(void)
|
||||
case UsbCommandId_SetLedPwmBrightness:
|
||||
UsbCommand_SetLedPwmBrightness();
|
||||
break;
|
||||
case UsbCommandId_GetModuleProperties:
|
||||
UsbCommand_GetModuleProperties();
|
||||
case UsbCommandId_GetModuleProperty:
|
||||
UsbCommand_GetModuleProperty();
|
||||
break;
|
||||
default:
|
||||
SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
UsbCommandId_GetDebugBuffer = 0x0b,
|
||||
UsbCommandId_GetAdcValue = 0x0c,
|
||||
UsbCommandId_SetLedPwmBrightness = 0x0d,
|
||||
UsbCommandId_GetModuleProperties = 0x0e,
|
||||
UsbCommandId_GetModuleProperty = 0x0e,
|
||||
} usb_command_id_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user