Rename DebugInfo to DebugBuffer and related files and variables.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
#include "fsl_i2c.h"
|
||||
#include "usb_command_get_debug_info.h"
|
||||
#include "usb_command_get_debug_buffer.h"
|
||||
#include "usb_protocol_handler.h"
|
||||
#include "slave_scheduler.h"
|
||||
#include "i2c_watchdog.h"
|
||||
|
||||
uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH];
|
||||
uint8_t DebugBuffer[USB_GENERIC_HID_OUT_BUFFER_LENGTH];
|
||||
|
||||
void UsbCommand_GetDebugInfo(void)
|
||||
void UsbCommand_GetDebugBuffer(void)
|
||||
{
|
||||
SET_DEBUG_BUFFER_UINT32(1, I2C_Watchdog);
|
||||
SET_DEBUG_BUFFER_UINT32(5, I2cSchedulerCounter);
|
||||
SET_DEBUG_BUFFER_UINT32(9, I2cWatchdog_OuterCounter);
|
||||
SET_DEBUG_BUFFER_UINT32(13, I2cWatchdog_InnerCounter);
|
||||
|
||||
memcpy(GenericHidOutBuffer, UsbDebugInfo, USB_GENERIC_HID_OUT_BUFFER_LENGTH);
|
||||
memcpy(GenericHidOutBuffer, DebugBuffer, USB_GENERIC_HID_OUT_BUFFER_LENGTH);
|
||||
|
||||
/* uint64_t ticks = microseconds_get_ticks();
|
||||
uint32_t microseconds = microseconds_convert_to_microseconds(ticks);
|
||||
22
right/src/usb_commands/usb_command_get_debug_buffer.h
Normal file
22
right/src/usb_commands/usb_command_get_debug_buffer.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef __USB_COMMAND_GET_DEBUG_BUFFER_H__
|
||||
#define __USB_COMMAND_GET_DEBUG_BUFFER_H__
|
||||
|
||||
// Includes:
|
||||
|
||||
#include "usb_interfaces/usb_interface_generic_hid.h"
|
||||
|
||||
// Macros:
|
||||
|
||||
#define SET_DEBUG_BUFFER_UINT8(offset, value) (*(uint8_t*)(DebugBuffer+(offset)) = (value))
|
||||
#define SET_DEBUG_BUFFER_UINT16(offset, value) (*(uint16_t*)(DebugBuffer+(offset)) = (value))
|
||||
#define SET_DEBUG_BUFFER_UINT32(offset, value) (*(uint32_t*)(DebugBuffer+(offset)) = (value))
|
||||
|
||||
// Variables:
|
||||
|
||||
extern uint8_t DebugBuffer[USB_GENERIC_HID_OUT_BUFFER_LENGTH];
|
||||
|
||||
// Functions:
|
||||
|
||||
void UsbCommand_GetDebugBuffer(void);
|
||||
|
||||
#endif
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef __USB_COMMAND_GET_DEBUG_INFO_H__
|
||||
#define __USB_COMMAND_GET_DEBUG_INFO_H__
|
||||
|
||||
// Includes:
|
||||
|
||||
#include "usb_interfaces/usb_interface_generic_hid.h"
|
||||
|
||||
// Macros:
|
||||
|
||||
#define SET_DEBUG_BUFFER_UINT8(offset, value) (*(uint8_t*)(UsbDebugInfo+(offset)) = (value))
|
||||
#define SET_DEBUG_BUFFER_UINT16(offset, value) (*(uint16_t*)(UsbDebugInfo+(offset)) = (value))
|
||||
#define SET_DEBUG_BUFFER_UINT32(offset, value) (*(uint32_t*)(UsbDebugInfo+(offset)) = (value))
|
||||
|
||||
// Variables:
|
||||
|
||||
extern uint8_t UsbDebugInfo[USB_GENERIC_HID_OUT_BUFFER_LENGTH];
|
||||
|
||||
// Functions:
|
||||
|
||||
void UsbCommand_GetDebugInfo(void);
|
||||
|
||||
#endif
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "usb_commands/usb_command_launch_eeprom_transfer_legacy.h"
|
||||
#include "usb_commands/usb_command_read_config.h"
|
||||
#include "usb_commands/usb_command_get_keyboard_state.h"
|
||||
#include "usb_commands/usb_command_get_debug_info.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"
|
||||
|
||||
@@ -55,7 +55,7 @@ void UsbProtocolHandler(void)
|
||||
UsbCommand_GetKeyboardState();
|
||||
break;
|
||||
case UsbCommandId_GetDebugInfo:
|
||||
UsbCommand_GetDebugInfo();
|
||||
UsbCommand_GetDebugBuffer();
|
||||
break;
|
||||
case UsbCommandId_JumpToSlaveBootloader:
|
||||
UsbCommand_JumpToSlaveBootloader();
|
||||
|
||||
Reference in New Issue
Block a user