update version to v2.1.5

This commit is contained in:
Artery-MCU
2023-08-08 19:27:03 +08:00
parent 3bac77751d
commit 4dcec715e1
719 changed files with 231851 additions and 2580 deletions

View File

@@ -197,8 +197,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
audio_set_interface(udev, setup);
usbd_ctrl_send_status(pudev);
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -52,7 +52,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure

View File

@@ -216,7 +216,12 @@ usb_sts_type class_audio_setup_handler(void *udev, usb_setup_type *setup)
usbd_ctrl_send_status(pudev);
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;
@@ -293,7 +298,12 @@ usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
paudio_hid->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -54,7 +54,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure
@@ -373,7 +376,7 @@ ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_AUHID_CONFIG_DESC_SIZE] AL
0x11, /* bmAttributes: endpoint attributes */
LBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */
HBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */
1, /* bInterval: interval for polling endpoint for data transfers */
1, /* bInterval: interval for polling endpoint for data transfers */
FEEDBACK_REFRESH_TIME, /* bRefresh: this field indicates the rate at which an iso syncronization
pipe provides new syncronization feedback data. this rate must be a power of
2, therefore only the power is reported back and the range of this field is from

View File

@@ -180,7 +180,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pcdc->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -53,7 +53,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure

View File

@@ -66,8 +66,8 @@ const static unsigned char _asciimap[128] =
0x00,// ACK
0x00,// BEL
0x2A,// BS Backspace
0x2B,// TAB Tab
0x28,// LF Enter
0x2B,// TAB Tab
0x28,// LF Enter
0x00,// VT
0x00,// FF
0x00,// CR
@@ -185,7 +185,7 @@ const static unsigned char _asciimap[128] =
0x31|SHIFT,// |
0x30|SHIFT,// }
0x35|SHIFT,// ~
0 // DEL
0 // DEL
};
linecoding_type linecoding_vcpkybrd =
@@ -356,7 +356,12 @@ static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
vcpkybrd->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;
@@ -431,7 +436,12 @@ static usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *set
case USB_STD_REQ_SET_INTERFACE:
vcpkybrd->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -52,7 +52,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure

View File

@@ -228,7 +228,12 @@ static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pcdc->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;
@@ -297,7 +302,10 @@ static usb_sts_type msc_class_setup_handler(void *udev, usb_setup_type *setup)
}
bot_scsi_clear_feature(udev, setup->wIndex);
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -266,7 +266,7 @@ typedef struct
uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN];
uint32_t blk_size[MSC_SUPPORT_MAX_LUN];
uint32_t blk_addr;
uint64_t blk_addr;
uint32_t blk_len;
uint32_t data_len;

View File

@@ -56,7 +56,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure

View File

@@ -43,11 +43,11 @@
#pragma data_alignment=4
#endif
ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = {
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
};
#if defined ( __ICCARM__ ) /* iar compiler */

View File

@@ -180,7 +180,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pcshid->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -52,7 +52,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief custom hid device descriptor handler structure

View File

@@ -171,7 +171,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
piap->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -55,7 +55,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief hid device descriptor handler structure

View File

@@ -54,133 +54,133 @@ const static unsigned char _asciimap[128] =
{
0x00,// NUL
0x00,// SOH
0x00,// STX
0x00,// ETX
0x00,// EOT
0x00,// ENQ
0x00,// ACK
0x00,// BEL
0x2A,// BS Backspace
0x2B,// TAB Tab
0x28,// LF Enter
0x00,// VT
0x00,// FF
0x00,// CR
0x00,// SO
0x00,// SI
0x00,// DEL
0x00,// DC1
0x00,// DC2
0x00,// DC3
0x00,// DC4
0x00,// NAK
0x00,// SYN
0x00,// ETB
0x00,// CAN
0x00,// EM
0x00,// SUB
0x00,// ESC
0x00,// FS
0x00,// GS
0x00,// RS
0x00,// US
0x00,// STX
0x00,// ETX
0x00,// EOT
0x00,// ENQ
0x00,// ACK
0x00,// BEL
0x2A,// BS Backspace
0x2B,// TAB Tab
0x28,// LF Enter
0x00,// VT
0x00,// FF
0x00,// CR
0x00,// SO
0x00,// SI
0x00,// DEL
0x00,// DC1
0x00,// DC2
0x00,// DC3
0x00,// DC4
0x00,// NAK
0x00,// SYN
0x00,// ETB
0x00,// CAN
0x00,// EM
0x00,// SUB
0x00,// ESC
0x00,// FS
0x00,// GS
0x00,// RS
0x00,// US
0x2C,// ' '
0x1E|SHIFT,// !
0x34|SHIFT,// "
0x20|SHIFT,// #
0x21|SHIFT,// $
0x22|SHIFT,// %
0x24|SHIFT,// &
0x34, // '
0x26|SHIFT,// (
0x27|SHIFT,// )
0x25|SHIFT,// *
0x2E|SHIFT,// +
0x36,// ,
0x2D,// -
0x37,// .
0x38,// /
0x27,// 0
0x1E,// 1
0x1F,// 2
0x20,// 3
0x21,// 4
0x22,// 5
0x23,// 6
0x24,// 7
0x25,// 8
0x26,// 9
0x33|SHIFT,// :
0x33, // ;
0x36|SHIFT,// <
0x2E, // =
0x37|SHIFT,// >
0x38|SHIFT,// ?
0x1F|SHIFT,// @
0x04|SHIFT,// A
0x05|SHIFT,// B
0x06|SHIFT,// C
0x07|SHIFT,// D
0x08|SHIFT,// E
0x09|SHIFT,// F
0x0A|SHIFT,// G
0x0B|SHIFT,// H
0x0C|SHIFT,// I
0x0D|SHIFT,// J
0x0E|SHIFT,// K
0x0F|SHIFT,// L
0x10|SHIFT,// M
0x11|SHIFT,// N
0x12|SHIFT,// O
0x13|SHIFT,// P
0x14|SHIFT,// Q
0x15|SHIFT,// R
0x16|SHIFT,// S
0x17|SHIFT,// T
0x18|SHIFT,// U
0x19|SHIFT,// V
0x1A|SHIFT,// W
0x1B|SHIFT,// X
0x1C|SHIFT,// Y
0x1D|SHIFT,// Z
0x2F, // [
0x31, // bslash
0x30, // ]
0x23|SHIFT,// ^
0x2D|SHIFT,// _
0x35, // `
0x04, // a
0x05, // b
0x06, // c
0x07, // d
0x08, // e
0x09, // f
0x0A, // g
0x0B, // h
0x0C, // i
0x0D, // j
0x0E, // k
0x0F, // l
0x10, // m
0x11, // n
0x12, // o
0x13, // p
0x14, // q
0x15, // r
0x16, // s
0x17, // t
0x18, // u
0x19, // v
0x1A, // w
0x1B, // x
0x1C, // y
0x1D, // z
0x2f|SHIFT,//
0x31|SHIFT,// |
0x30|SHIFT,// }
0x35|SHIFT,// ~
0 // DEL
0x2C,// ' '
0x1E|SHIFT,// !
0x34|SHIFT,// "
0x20|SHIFT,// #
0x21|SHIFT,// $
0x22|SHIFT,// %
0x24|SHIFT,// &
0x34, // '
0x26|SHIFT,// (
0x27|SHIFT,// )
0x25|SHIFT,// *
0x2E|SHIFT,// +
0x36,// ,
0x2D,// -
0x37,// .
0x38,// /
0x27,// 0
0x1E,// 1
0x1F,// 2
0x20,// 3
0x21,// 4
0x22,// 5
0x23,// 6
0x24,// 7
0x25,// 8
0x26,// 9
0x33|SHIFT,// :
0x33, // ;
0x36|SHIFT,// <
0x2E, // =
0x37|SHIFT,// >
0x38|SHIFT,// ?
0x1F|SHIFT,// @
0x04|SHIFT,// A
0x05|SHIFT,// B
0x06|SHIFT,// C
0x07|SHIFT,// D
0x08|SHIFT,// E
0x09|SHIFT,// F
0x0A|SHIFT,// G
0x0B|SHIFT,// H
0x0C|SHIFT,// I
0x0D|SHIFT,// J
0x0E|SHIFT,// K
0x0F|SHIFT,// L
0x10|SHIFT,// M
0x11|SHIFT,// N
0x12|SHIFT,// O
0x13|SHIFT,// P
0x14|SHIFT,// Q
0x15|SHIFT,// R
0x16|SHIFT,// S
0x17|SHIFT,// T
0x18|SHIFT,// U
0x19|SHIFT,// V
0x1A|SHIFT,// W
0x1B|SHIFT,// X
0x1C|SHIFT,// Y
0x1D|SHIFT,// Z
0x2F, // [
0x31, // bslash
0x30, // ]
0x23|SHIFT,// ^
0x2D|SHIFT,// _
0x35, // `
0x04, // a
0x05, // b
0x06, // c
0x07, // d
0x08, // e
0x09, // f
0x0A, // g
0x0B, // h
0x0C, // i
0x0D, // j
0x0E, // k
0x0F, // l
0x10, // m
0x11, // n
0x12, // o
0x13, // p
0x14, // q
0x15, // r
0x16, // s
0x17, // t
0x18, // u
0x19, // v
0x1A, // w
0x1B, // x
0x1C, // y
0x1D, // z
0x2f|SHIFT,//
0x31|SHIFT,// |
0x30|SHIFT,// }
0x35|SHIFT,// ~
0 // DEL
};
/* usb device class handler */
@@ -301,7 +301,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pkeyboard->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -53,7 +53,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief keyboard device descriptor handler structure

View File

@@ -166,6 +166,10 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pmouse->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;

View File

@@ -53,7 +53,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief mouse device descriptor handler structure

View File

@@ -42,11 +42,11 @@
#pragma data_alignment=4
#endif
ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = {
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
};
#if defined ( __ICCARM__ ) /* iar compiler */

View File

@@ -197,7 +197,7 @@ typedef struct
uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN];
uint32_t blk_size[MSC_SUPPORT_MAX_LUN];
uint32_t blk_addr;
uint64_t blk_addr;
uint32_t blk_len;
uint32_t data_len;

View File

@@ -164,7 +164,10 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
}
bot_scsi_clear_feature(udev, setup->wIndex);
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -54,7 +54,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure

View File

@@ -163,7 +163,12 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
case USB_STD_REQ_SET_INTERFACE:
pprter->alt_setting = setup->wValue;
break;
case USB_STD_REQ_CLEAR_FEATURE:
break;
case USB_STD_REQ_SET_FEATURE:
break;
default:
usbd_ctrl_unsupport(pudev);
break;
}
break;

View File

@@ -54,7 +54,10 @@ static usbd_desc_t *get_device_config_string(void);
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
static void get_serial_num(void);
static uint8_t g_usbd_desc_buffer[256];
#if defined ( __ICCARM__ ) /* iar compiler */
#pragma data_alignment=4
#endif
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
/**
* @brief device descriptor handler structure