Replace {GET,SET}_USB_BUFFER_UINT8 with {Get,Set}UsbRxBufferUint8
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "usb_protocol_handler.h"
|
||||
#include "buffer.h"
|
||||
#include "usb_commands/usb_command_get_property.h"
|
||||
#include "usb_commands/usb_command_reenumerate.h"
|
||||
#include "usb_commands/usb_command_set_test_led.h"
|
||||
@@ -16,7 +17,7 @@
|
||||
void UsbProtocolHandler(void)
|
||||
{
|
||||
bzero(GenericHidOutBuffer, USB_GENERIC_HID_OUT_BUFFER_LENGTH);
|
||||
uint8_t command = GET_USB_BUFFER_UINT8(0);
|
||||
uint8_t command = GetUsbRxBufferUint8(0);
|
||||
switch (command) {
|
||||
case UsbCommandId_GetProperty:
|
||||
UsbCommand_GetProperty();
|
||||
@@ -64,7 +65,37 @@ void UsbProtocolHandler(void)
|
||||
UsbCommand_SendKbootCommand();
|
||||
break;
|
||||
default:
|
||||
SET_USB_BUFFER_UINT8(0, UsbStatusCode_InvalidCommand);
|
||||
SetUsbTxBufferUint8(0, UsbStatusCode_InvalidCommand);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t GetUsbRxBufferUint8(uint32_t offset)
|
||||
{
|
||||
return GetBufferUint8(GenericHidInBuffer, offset);
|
||||
}
|
||||
|
||||
uint16_t GetUsbRxBufferUint16(uint32_t offset)
|
||||
{
|
||||
return GetBufferUint16(GenericHidInBuffer, offset);
|
||||
}
|
||||
|
||||
uint32_t GetUsbRxBufferUint32(uint32_t offset)
|
||||
{
|
||||
return GetBufferUint32(GenericHidInBuffer, offset);
|
||||
}
|
||||
|
||||
void SetUsbTxBufferUint8(uint32_t offset, uint8_t value)
|
||||
{
|
||||
SetBufferUint8(GenericHidOutBuffer, offset, value);
|
||||
}
|
||||
|
||||
void SetUsbTxBufferUint16(uint32_t offset, uint16_t value)
|
||||
{
|
||||
SetBufferUint16(GenericHidOutBuffer, offset, value);
|
||||
}
|
||||
|
||||
void SetUsbTxBufferUint32(uint32_t offset, uint32_t value)
|
||||
{
|
||||
SetBufferUint32(GenericHidOutBuffer, offset, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user