Remove util.[ch] because USB_SHORT_GET_{LOW,HIGH} can be used in place of GET_[LM]SB_OF_WORD()
This commit is contained in:
@@ -180,8 +180,6 @@ add_executable(dev_composite_hid_mouse_hid_keyboard_bm.elf
|
|||||||
"${SrcDir}/usb_keyboard_descriptors.h"
|
"${SrcDir}/usb_keyboard_descriptors.h"
|
||||||
"${SrcDir}/usb_mouse_descriptors.c"
|
"${SrcDir}/usb_mouse_descriptors.c"
|
||||||
"${SrcDir}/usb_mouse_descriptors.h"
|
"${SrcDir}/usb_mouse_descriptors.h"
|
||||||
"${SrcDir}/util.c"
|
|
||||||
"${SrcDir}/util.h"
|
|
||||||
"${KsdkDir}/devices/MK22F51212/system_MK22F51212.c"
|
"${KsdkDir}/devices/MK22F51212/system_MK22F51212.c"
|
||||||
"${KsdkDir}/devices/MK22F51212/system_MK22F51212.h"
|
"${KsdkDir}/devices/MK22F51212/system_MK22F51212.h"
|
||||||
"${KsdkDir}/devices/MK22F51212/utilities/fsl_debug_console.c"
|
"${KsdkDir}/devices/MK22F51212/utilities/fsl_debug_console.c"
|
||||||
|
|||||||
@@ -240,16 +240,6 @@
|
|||||||
<type>1</type>
|
<type>1</type>
|
||||||
<locationURI>PARENT-2-PROJECT_LOC/usb_mouse_descriptors.h</locationURI>
|
<locationURI>PARENT-2-PROJECT_LOC/usb_mouse_descriptors.h</locationURI>
|
||||||
</link>
|
</link>
|
||||||
<link>
|
|
||||||
<name>sources/util.c</name>
|
|
||||||
<type>1</type>
|
|
||||||
<locationURI>PARENT-2-PROJECT_LOC/util.c</locationURI>
|
|
||||||
</link>
|
|
||||||
<link>
|
|
||||||
<name>sources/util.h</name>
|
|
||||||
<type>1</type>
|
|
||||||
<locationURI>PARENT-2-PROJECT_LOC/util.h</locationURI>
|
|
||||||
</link>
|
|
||||||
<link>
|
<link>
|
||||||
<name>startup/startup_MK22F51212.S</name>
|
<name>startup/startup_MK22F51212.S</name>
|
||||||
<type>1</type>
|
<type>1</type>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include "usb_device.h"
|
#include "usb_device.h"
|
||||||
#include "include/usb/usb_device_class.h"
|
#include "include/usb/usb_device_class.h"
|
||||||
#include "include/usb/usb_device_hid.h"
|
#include "include/usb/usb_device_hid.h"
|
||||||
#include "util.h"
|
|
||||||
#include "usb_device_descriptor.h"
|
#include "usb_device_descriptor.h"
|
||||||
#include "composite.h"
|
#include "composite.h"
|
||||||
#include "hid_keyboard.h"
|
#include "hid_keyboard.h"
|
||||||
@@ -18,10 +17,10 @@ uint8_t UsbDeviceDescriptor[USB_DESCRIPTOR_LENGTH_DEVICE] = {
|
|||||||
USB_DEVICE_SUBCLASS,
|
USB_DEVICE_SUBCLASS,
|
||||||
USB_DEVICE_PROTOCOL,
|
USB_DEVICE_PROTOCOL,
|
||||||
USB_CONTROL_MAX_PACKET_SIZE,
|
USB_CONTROL_MAX_PACKET_SIZE,
|
||||||
GET_LSB_OF_WORD(USB_VENDOR_ID),
|
USB_SHORT_GET_LOW(USB_VENDOR_ID),
|
||||||
GET_MSB_OF_WORD(USB_VENDOR_ID),
|
USB_SHORT_GET_HIGH(USB_VENDOR_ID),
|
||||||
GET_LSB_OF_WORD(USB_PRODUCT_ID),
|
USB_SHORT_GET_LOW(USB_PRODUCT_ID),
|
||||||
GET_MSB_OF_WORD(USB_PRODUCT_ID),
|
USB_SHORT_GET_HIGH(USB_PRODUCT_ID),
|
||||||
USB_SHORT_GET_LOW(USB_DEVICE_RELEASE_NUMBER),
|
USB_SHORT_GET_LOW(USB_DEVICE_RELEASE_NUMBER),
|
||||||
USB_SHORT_GET_HIGH(USB_DEVICE_RELEASE_NUMBER),
|
USB_SHORT_GET_HIGH(USB_DEVICE_RELEASE_NUMBER),
|
||||||
USB_STRING_DESCRIPTOR_ID_MANUFACTURER,
|
USB_STRING_DESCRIPTOR_ID_MANUFACTURER,
|
||||||
@@ -118,8 +117,8 @@ uint8_t UsbConfigurationDescriptor[USB_CONFIGURATION_DESCRIPTOR_TOTAL_LENGTH] =
|
|||||||
uint8_t UsbLanguageListStringDescriptor[USB_LANGUAGE_LIST_STRING_DESCRIPTOR_LENGTH] = {
|
uint8_t UsbLanguageListStringDescriptor[USB_LANGUAGE_LIST_STRING_DESCRIPTOR_LENGTH] = {
|
||||||
sizeof(UsbLanguageListStringDescriptor),
|
sizeof(UsbLanguageListStringDescriptor),
|
||||||
USB_DESCRIPTOR_TYPE_STRING,
|
USB_DESCRIPTOR_TYPE_STRING,
|
||||||
GET_LSB_OF_WORD(USB_LANGUAGE_ID_UNITED_STATES),
|
USB_SHORT_GET_LOW(USB_LANGUAGE_ID_UNITED_STATES),
|
||||||
GET_MSB_OF_WORD(USB_LANGUAGE_ID_UNITED_STATES)
|
USB_SHORT_GET_HIGH(USB_LANGUAGE_ID_UNITED_STATES)
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t UsbManufacturerString[USB_MANUFACTURER_STRING_DESCRIPTOR_LENGTH] = {
|
uint8_t UsbManufacturerString[USB_MANUFACTURER_STRING_DESCRIPTOR_LENGTH] = {
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#ifndef __UTIL_H__
|
|
||||||
#define __UTIL_H__
|
|
||||||
|
|
||||||
// Macros:
|
|
||||||
|
|
||||||
#define GET_MSB_OF_WORD(word) ((uint8_t)((word) >> 8))
|
|
||||||
#define GET_LSB_OF_WORD(word) ((uint8_t)((word) & 0xff))
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user