diff --git a/right/src/usb_commands/usb_command_jump_to_slave_bootloader.c b/right/src/usb_commands/usb_command_jump_to_module_bootloader.c similarity index 63% rename from right/src/usb_commands/usb_command_jump_to_slave_bootloader.c rename to right/src/usb_commands/usb_command_jump_to_module_bootloader.c index 21da0a4..cd2aa08 100644 --- a/right/src/usb_commands/usb_command_jump_to_slave_bootloader.c +++ b/right/src/usb_commands/usb_command_jump_to_module_bootloader.c @@ -1,14 +1,14 @@ #include "usb_protocol_handler.h" -#include "usb_commands/usb_command_jump_to_slave_bootloader.h" +#include "usb_commands/usb_command_jump_to_module_bootloader.h" #include "slot.h" #include "slave_drivers/uhk_module_driver.h" -void UsbCommand_JumpToSlaveBootloader(void) +void UsbCommand_JumpToModuleBootloader(void) { uint8_t slotId = GetUsbRxBufferUint8(1); if (!IS_VALID_SLAVE_SLOT(slotId)) { - SetUsbTxBufferUint8(0, UsbStatusCode_JumpToSlaveBootloader_InvalidSlaveSlotId); + SetUsbTxBufferUint8(0, UsbStatusCode_JumpToModuleBootloader_InvalidSlaveSlotId); return; } diff --git a/right/src/usb_commands/usb_command_jump_to_module_bootloader.h b/right/src/usb_commands/usb_command_jump_to_module_bootloader.h new file mode 100644 index 0000000..e004f3a --- /dev/null +++ b/right/src/usb_commands/usb_command_jump_to_module_bootloader.h @@ -0,0 +1,14 @@ +#ifndef __USB_COMMAND_JUMP_TO_MODULE_BOOTLOADER_H__ +#define __USB_COMMAND_JUMP_TO_MODULE_BOOTLOADER_H__ + +// Functions: + + void UsbCommand_JumpToModuleBootloader(void); + +// Typedefs: + + typedef enum { + UsbStatusCode_JumpToModuleBootloader_InvalidSlaveSlotId = 2, + } usb_status_code_jump_to_module_bootloader_t; + +#endif diff --git a/right/src/usb_commands/usb_command_jump_to_slave_bootloader.h b/right/src/usb_commands/usb_command_jump_to_slave_bootloader.h deleted file mode 100644 index a81fd9e..0000000 --- a/right/src/usb_commands/usb_command_jump_to_slave_bootloader.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __USB_COMMAND_JUMP_TO_SLAVE_BOOTLOADER_H__ -#define __USB_COMMAND_JUMP_TO_SLAVE_BOOTLOADER_H__ - -// Functions: - - void UsbCommand_JumpToSlaveBootloader(void); - -// Typedefs: - - typedef enum { - UsbStatusCode_JumpToSlaveBootloader_InvalidSlaveSlotId = 2, - } usb_status_code_jump_to_slave_bootloader_t; - -#endif diff --git a/right/src/usb_commands/usb_command_send_kboot_command.h b/right/src/usb_commands/usb_command_send_kboot_command.h deleted file mode 100644 index 0da7a26..0000000 --- a/right/src/usb_commands/usb_command_send_kboot_command.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __USB_COMMAND_SEND_KBOOT_COMMAND_H__ -#define __USB_COMMAND_SEND_KBOOT_COMMAND_H__ - -// Functions: - - void UsbCommand_SendKbootCommand(void); - -#endif diff --git a/right/src/usb_commands/usb_command_send_kboot_command.c b/right/src/usb_commands/usb_command_send_kboot_command_to_module.c similarity index 69% rename from right/src/usb_commands/usb_command_send_kboot_command.c rename to right/src/usb_commands/usb_command_send_kboot_command_to_module.c index 3b1213a..fea63ac 100644 --- a/right/src/usb_commands/usb_command_send_kboot_command.c +++ b/right/src/usb_commands/usb_command_send_kboot_command_to_module.c @@ -1,8 +1,8 @@ #include "usb_protocol_handler.h" -#include "usb_commands/usb_command_send_kboot_command.h" +#include "usb_commands/usb_command_send_kboot_command_to_module.h" #include "slave_drivers/kboot_driver.h" -void UsbCommand_SendKbootCommand(void) +void UsbCommand_SendKbootCommandToModule(void) { KbootDriverState.phase = 0; KbootDriverState.i2cAddress = GetUsbRxBufferUint8(2); diff --git a/right/src/usb_commands/usb_command_send_kboot_command_to_module.h b/right/src/usb_commands/usb_command_send_kboot_command_to_module.h new file mode 100644 index 0000000..e1b3b09 --- /dev/null +++ b/right/src/usb_commands/usb_command_send_kboot_command_to_module.h @@ -0,0 +1,8 @@ +#ifndef __USB_COMMAND_SEND_KBOOT_COMMAND_TO_MODULE_H__ +#define __USB_COMMAND_SEND_KBOOT_COMMAND_TO_MODULE_H__ + +// Functions: + + void UsbCommand_SendKbootCommandToModule(void); + +#endif diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index a14fd94..bbecd49 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -11,8 +11,8 @@ #include "usb_commands/usb_command_read_config.h" #include "usb_commands/usb_command_get_keyboard_state.h" #include "usb_commands/usb_command_get_debug_buffer.h" -#include "usb_commands/usb_command_jump_to_slave_bootloader.h" -#include "usb_commands/usb_command_send_kboot_command.h" +#include "usb_commands/usb_command_jump_to_module_bootloader.h" +#include "usb_commands/usb_command_send_kboot_command_to_module.h" void UsbProtocolHandler(void) { @@ -55,14 +55,14 @@ void UsbProtocolHandler(void) case UsbCommandId_GetKeyboardState: UsbCommand_GetKeyboardState(); break; - case UsbCommandId_GetDebugInfo: + case UsbCommandId_GetDebugBuffer: UsbCommand_GetDebugBuffer(); break; case UsbCommandId_JumpToModuleBootloader: - UsbCommand_JumpToSlaveBootloader(); + UsbCommand_JumpToModuleBootloader(); break; case UsbCommandId_SendKbootCommandToModule: - UsbCommand_SendKbootCommand(); + UsbCommand_SendKbootCommandToModule(); break; default: SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand); diff --git a/right/src/usb_protocol_handler.h b/right/src/usb_protocol_handler.h index 59dabff..dc54bf7 100644 --- a/right/src/usb_protocol_handler.h +++ b/right/src/usb_protocol_handler.h @@ -25,7 +25,7 @@ UsbCommandId_WriteHardwareConfig = 14, UsbCommandId_ReadUserConfig = 15, UsbCommandId_GetKeyboardState = 16, - UsbCommandId_GetDebugInfo = 17, + UsbCommandId_GetDebugBuffer = 17, UsbCommandId_JumpToModuleBootloader = 18, UsbCommandId_SendKbootCommandToModule = 19, } usb_command_id_t;