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 "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 "usb_protocol_handler.h"
|
||||||
#include "slot.h"
|
#include "slot.h"
|
||||||
#include "slave_drivers/uhk_module_driver.h"
|
#include "slave_drivers/uhk_module_driver.h"
|
||||||
|
|
||||||
void UsbCommand_GetModuleProperties()
|
void UsbCommand_GetModuleProperty()
|
||||||
{
|
{
|
||||||
slot_t slotId = GetUsbRxBufferUint8(1);
|
slot_t slotId = GetUsbRxBufferUint8(1);
|
||||||
|
|
||||||
if (!IS_VALID_MODULE_SLOT(slotId)) {
|
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);
|
uint8_t moduleDriverId = SLOT_ID_TO_UHK_MODULE_DRIVER_ID(slotId);
|
||||||
@@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
void UsbCommand_GetModuleProperties();
|
void UsbCommand_GetModuleProperty();
|
||||||
|
|
||||||
// Typedefs:
|
// Typedefs:
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UsbStatusCode_ReadConfig_InvalidModuleSlotId = 2,
|
UsbStatusCode_GetModuleProperty_InvalidModuleSlotId = 2,
|
||||||
} usb_status_code_get_module_properties_t;
|
} usb_status_code_get_module_properties_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "usb_protocol_handler.h"
|
#include "usb_protocol_handler.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "usb_commands/usb_command_get_property.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_reenumerate.h"
|
||||||
#include "usb_commands/usb_command_set_test_led.h"
|
#include "usb_commands/usb_command_set_test_led.h"
|
||||||
#include "usb_commands/usb_command_write_config.h"
|
#include "usb_commands/usb_command_write_config.h"
|
||||||
@@ -61,8 +62,8 @@ void UsbProtocolHandler(void)
|
|||||||
case UsbCommandId_SetLedPwmBrightness:
|
case UsbCommandId_SetLedPwmBrightness:
|
||||||
UsbCommand_SetLedPwmBrightness();
|
UsbCommand_SetLedPwmBrightness();
|
||||||
break;
|
break;
|
||||||
case UsbCommandId_GetModuleProperties:
|
case UsbCommandId_GetModuleProperty:
|
||||||
UsbCommand_GetModuleProperties();
|
UsbCommand_GetModuleProperty();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand);
|
SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
UsbCommandId_GetDebugBuffer = 0x0b,
|
UsbCommandId_GetDebugBuffer = 0x0b,
|
||||||
UsbCommandId_GetAdcValue = 0x0c,
|
UsbCommandId_GetAdcValue = 0x0c,
|
||||||
UsbCommandId_SetLedPwmBrightness = 0x0d,
|
UsbCommandId_SetLedPwmBrightness = 0x0d,
|
||||||
UsbCommandId_GetModuleProperties = 0x0e,
|
UsbCommandId_GetModuleProperty = 0x0e,
|
||||||
} usb_command_id_t;
|
} usb_command_id_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
Reference in New Issue
Block a user