rename descriptor variables
This commit is contained in:
@@ -23,7 +23,7 @@ int main(void)
|
||||
board_init();
|
||||
tusb_init();
|
||||
|
||||
//print_greeting();
|
||||
print_greeting();
|
||||
while (1)
|
||||
{
|
||||
if (current_tick + 1000 < system_ticks)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#if TUSB_CFG_DEVICE_HID_KEYBOARD
|
||||
TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
|
||||
const uint8_t keyboard_report_descriptor[] = {
|
||||
const uint8_t app_tusb_keyboard_desc_report[] = {
|
||||
HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ),
|
||||
HID_USAGE ( HID_USAGE_DESKTOP_KEYBOARD ),
|
||||
HID_COLLECTION ( HID_COLLECTION_APPLICATION ),
|
||||
@@ -120,7 +120,7 @@ const uint8_t mouse_report_descriptor[] = {
|
||||
#endif
|
||||
|
||||
TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
|
||||
tusb_descriptor_device_t const app_desc_device =
|
||||
tusb_descriptor_device_t const app_tusb_desc_device =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_device_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_DEVICE,
|
||||
@@ -144,7 +144,7 @@ tusb_descriptor_device_t const app_desc_device =
|
||||
|
||||
|
||||
TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
|
||||
const app_descriptor_configuration_t app_desc_configuration =
|
||||
const app_descriptor_configuration_t app_tusb_desc_configuration =
|
||||
{
|
||||
.configuration =
|
||||
{
|
||||
@@ -290,7 +290,7 @@ const app_descriptor_configuration_t app_desc_configuration =
|
||||
.bCountryCode = HID_Local_NotSupported,
|
||||
.bNumDescriptors = 1,
|
||||
.bReportType = HID_DESC_TYPE_REPORT,
|
||||
.wReportLength = sizeof(keyboard_report_descriptor)
|
||||
.wReportLength = sizeof(app_tusb_keyboard_desc_report)
|
||||
},
|
||||
|
||||
.keyboard_endpoint =
|
||||
@@ -379,7 +379,7 @@ const app_descriptor_configuration_t app_desc_configuration =
|
||||
};
|
||||
|
||||
TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4)
|
||||
const app_descriptor_string_t app_desc_strings =
|
||||
const app_descriptor_string_t app_tusb_desc_strings =
|
||||
{
|
||||
.LangID = { .bLength = 0x04, .bDescriptorType = TUSB_DESC_TYPE_STRING },
|
||||
.strLangID= {0x0409}, // US English
|
||||
|
||||
@@ -30,15 +30,15 @@
|
||||
* This file is part of the tinyUSB stack
|
||||
*/
|
||||
|
||||
#ifndef _DESCRIPTORS_H_
|
||||
#define _DESCRIPTORS_H_
|
||||
#ifndef _TUSB_DESCRIPTORS_H_
|
||||
#define _TUSB_DESCRIPTORS_H_
|
||||
|
||||
#include "tusb.h"
|
||||
|
||||
#define TUSB_CFG_DEVICE_STRING_MANUFACTURER "tinyUSB"
|
||||
#define TUSB_CFG_DEVICE_STRING_PRODUCT "Device Keyboard"
|
||||
#define TUSB_CFG_DEVICE_STRING_SERIAL "1234"
|
||||
#define TUSB_CFG_DEVICE_VENDORID 0x1FC9
|
||||
#define TUSB_CFG_DEVICE_VENDORID 0x1FC9 // NXP
|
||||
//#define TUSB_CFG_DEVICE_PRODUCTID
|
||||
|
||||
/* USB Serial uses the MCUs unique 128-bit chip ID via an IAP call = 32 hex chars */
|
||||
@@ -154,10 +154,11 @@ typedef ATTR_PACKED_STRUCT(struct)
|
||||
uint8_t null_termination; // NXP rom driver requires this to work
|
||||
} app_descriptor_configuration_t;
|
||||
|
||||
extern const tusb_descriptor_device_t app_desc_device;
|
||||
extern const app_descriptor_configuration_t app_desc_configuration;
|
||||
extern const app_descriptor_string_t app_desc_strings;
|
||||
extern const uint8_t keyboard_report_descriptor[];
|
||||
extern const tusb_descriptor_device_t app_tusb_desc_device;
|
||||
extern const app_descriptor_configuration_t app_tusb_desc_configuration;
|
||||
extern const app_descriptor_string_t app_tusb_desc_strings;
|
||||
|
||||
extern const uint8_t app_tusb_keyboard_desc_report[];
|
||||
|
||||
//extern const uint8_t HID_MouseReportDescriptor[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user