📄 usb_string_desc.c
字号:
/* Copyright (c) 2007 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is confidential property of
* Nordic Semiconductor. The use, copying, transfer or disclosure
* of such information is prohibited except by express written
* agreement with Nordic Semiconductor.
*/
/** @file
* USB string descriptors. All string descriptors required for the USB
* is located in this file.
*
* @author Runar Kjellhaug
*
* @addtogroup usb_descriptors
* @{
*/
#include "usb_desc.h"
#define STR0LEN 4
code const uint8_t String0Desc [STR0LEN] =
{
STR0LEN, 0x03, 0x09, 0x04
}; //end of String0Desc
#define STR1LEN sizeof ("Nordic Semiconductor ASA") * 2
code const uint8_t String1Desc [STR1LEN] =
{
STR1LEN, 0x03,
'N', 0,
'o', 0,
'r', 0,
'd', 0,
'i', 0,
'c', 0,
' ', 0,
'S', 0,
'e', 0,
'm', 0,
'i', 0,
'c', 0,
'o', 0,
'n', 0,
'd', 0,
'u', 0,
'c', 0,
't', 0,
'o', 0,
'r', 0,
' ', 0,
'A', 0,
'S', 0,
'A', 0,
}; //end of String1Desc
#define STR2LEN sizeof ("nRF USB Dongle") * 2
code const uint8_t String2Desc [STR2LEN] =
{
STR2LEN, 0x03,
'n', 0,
'R', 0,
'F', 0,
' ', 0,
'U', 0,
'S', 0,
'B', 0,
' ', 0,
'D', 0,
'o', 0,
'n', 0,
'g', 0,
'l', 0,
'e', 0
}; //end of String2Desc
#define STR3LEN sizeof ("00000001") * 2
code const uint8_t String3Desc [STR3LEN] =
{
STR3LEN, 0x03,
'0', 0,
'0', 0,
'0', 0,
'0', 0,
'0', 0,
'0', 0,
'0', 0,
'1', 0
}; //end of String3Desc
const uint8_t* code STRINGDESCTABLE [] =
{
&String0Desc[0],
&String1Desc[0],
&String2Desc[0],
&String3Desc[0]
};
/** @} */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -