mirror of
https://github.com/ArteryTek/AT32F415_Firmware_Library.git
synced 2026-05-21 09:22:11 +00:00
update version to v2.0.2
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file msc_bot_scsi.c
|
||||
* @version v2.0.0
|
||||
* @date 2021-11-26
|
||||
* @version v2.0.2
|
||||
* @date 2021-12-31
|
||||
* @brief usb mass storage bulk-only transport and scsi command
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
@@ -49,7 +49,10 @@ csw_type csw_struct =
|
||||
CSW_BCSWSTATUS_PASS,
|
||||
};
|
||||
|
||||
uint8_t page00_inquiry_data[] = {
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
@@ -57,7 +60,10 @@ uint8_t page00_inquiry_data[] = {
|
||||
0x00,
|
||||
|
||||
};
|
||||
sense_type sense_data =
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD sense_type sense_data ALIGNED_TAIL =
|
||||
{
|
||||
0x70,
|
||||
0x00,
|
||||
@@ -70,8 +76,10 @@ sense_type sense_data =
|
||||
0x00000000
|
||||
};
|
||||
|
||||
|
||||
uint8_t mode_sense6_data[8] =
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD uint8_t mode_sense6_data[8] ALIGNED_TAIL =
|
||||
{
|
||||
0x00,
|
||||
0x00,
|
||||
@@ -83,7 +91,10 @@ uint8_t mode_sense6_data[8] =
|
||||
0x00
|
||||
};
|
||||
|
||||
uint8_t mode_sense10_data[8] =
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD uint8_t mode_sense10_data[8] ALIGNED_TAIL =
|
||||
{
|
||||
0x00,
|
||||
0x06,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file msc_bot_scsi.h
|
||||
* @version v2.0.0
|
||||
* @date 2021-11-26
|
||||
* @version v2.0.2
|
||||
* @date 2021-12-31
|
||||
* @brief usb mass storage bulk-only transport and scsi command header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
@@ -194,7 +194,7 @@ typedef struct
|
||||
{
|
||||
uint8_t msc_state;
|
||||
uint8_t bot_status;
|
||||
uint8_t max_lun;
|
||||
uint32_t max_lun;
|
||||
|
||||
uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN];
|
||||
uint32_t blk_size[MSC_SUPPORT_MAX_LUN];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file msc_class.c
|
||||
* @version v2.0.0
|
||||
* @date 2021-11-26
|
||||
* @version v2.0.2
|
||||
* @date 2021-12-31
|
||||
* @brief usb msc class type
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
@@ -130,7 +130,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
|
||||
switch(setup->bRequest)
|
||||
{
|
||||
case MSC_REQ_GET_MAX_LUN:
|
||||
usbd_ctrl_send(pudev, &msc_struct.max_lun, 1);
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&msc_struct.max_lun, 1);
|
||||
break;
|
||||
case MSC_REQ_BO_RESET:
|
||||
bot_scsi_reset(udev);
|
||||
@@ -220,10 +220,6 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num)
|
||||
usb_sts_type status = USB_OK;
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
usb_flush_tx_fifo(pudev->usb_reg, ept_num&0x7F);
|
||||
// if(msc_struct.msc_state != MSC_STATE_MACHINE_IDLE)
|
||||
// {
|
||||
// bot_scsi_datain_handler(udev, ept_num);
|
||||
// }
|
||||
bot_scsi_datain_handler(udev, ept_num);
|
||||
return status;
|
||||
}
|
||||
@@ -237,8 +233,6 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num)
|
||||
usb_sts_type class_out_handler(void *udev, uint8_t ept_num)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
// if(msc_struct.msc_state == MSC_STATE_MACHINE_IDLE)
|
||||
// msc_struct.msc_state = MSC_STATE_MACHINE_CMD;
|
||||
bot_scsi_dataout_handler(udev, ept_num);
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file msc_class.h
|
||||
* @version v2.0.0
|
||||
* @date 2021-11-26
|
||||
* @version v2.0.2
|
||||
* @date 2021-12-31
|
||||
* @brief usb msc class file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file msc_desc.c
|
||||
* @version v2.0.0
|
||||
* @date 2021-11-26
|
||||
* @version v2.0.2
|
||||
* @date 2021-12-31
|
||||
* @brief usb msc device descriptor
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
@@ -78,7 +78,10 @@ usbd_desc_handler msc_desc_handler =
|
||||
/**
|
||||
* @brief usb device standard descriptor
|
||||
*/
|
||||
uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] =
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL =
|
||||
{
|
||||
USB_DEVICE_DESC_LEN, /* bLength */
|
||||
USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */
|
||||
@@ -103,7 +106,10 @@ uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] =
|
||||
/**
|
||||
* @brief usb configuration standard descriptor
|
||||
*/
|
||||
uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] =
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL =
|
||||
{
|
||||
USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */
|
||||
USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */
|
||||
@@ -146,7 +152,10 @@ uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] =
|
||||
/**
|
||||
* @brief usb string lang id
|
||||
*/
|
||||
uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] =
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL =
|
||||
{
|
||||
USBD_SIZ_STRING_LANGID,
|
||||
USB_DESCIPTOR_TYPE_STRING,
|
||||
@@ -157,7 +166,10 @@ uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] =
|
||||
/**
|
||||
* @brief usb string serial
|
||||
*/
|
||||
uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] =
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL =
|
||||
{
|
||||
USBD_SIZ_STRING_SERIAL,
|
||||
USB_DESCIPTOR_TYPE_STRING,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file msc_desc.h
|
||||
* @version v2.0.0
|
||||
* @date 2021-11-26
|
||||
* @version v2.0.2
|
||||
* @date 2021-12-31
|
||||
* @brief usb msc descriptor header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
|
||||
Reference in New Issue
Block a user