Replace SET_DEBUG_BUFFER_UINT* macros with SetDebugBufferUint* functions for improved type safety and readability.
This commit is contained in:
@@ -5,12 +5,6 @@
|
||||
|
||||
#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];
|
||||
@@ -19,4 +13,8 @@
|
||||
|
||||
void UsbCommand_GetDebugBuffer(void);
|
||||
|
||||
void SetDebugBufferUint8(uint32_t offset, uint8_t value);
|
||||
void SetDebugBufferUint16(uint32_t offset, uint16_t value);
|
||||
void SetDebugBufferUint32(uint32_t offset, uint32_t value);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user