Reverted r2089, 2088, 2085, 2084, 2081, X9D was broken.
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@
|
||||
#ifndef _USB_MSC_CORE_H_
|
||||
#define _USB_MSC_CORE_H_
|
||||
|
||||
#include "../../../Core/inc/usbd_ioreq.h"
|
||||
#include "usbd_ioreq.h"
|
||||
|
||||
/** @addtogroup USBD_MSC_BOT
|
||||
* @{
|
||||
|
||||
+6
-6
@@ -266,9 +266,9 @@ static int8_t SCSI_ReadCapacity10(uint8_t lun, uint8_t *params)
|
||||
else
|
||||
{
|
||||
|
||||
MSC_BOT_Data[0] = (uint8_t)((SCSI_blk_nbr - 1) >> 24);
|
||||
MSC_BOT_Data[1] = (uint8_t)((SCSI_blk_nbr - 1) >> 16);
|
||||
MSC_BOT_Data[2] = (uint8_t)((SCSI_blk_nbr - 1) >> 8);
|
||||
MSC_BOT_Data[0] = (uint8_t)(SCSI_blk_nbr - 1 >> 24);
|
||||
MSC_BOT_Data[1] = (uint8_t)(SCSI_blk_nbr - 1 >> 16);
|
||||
MSC_BOT_Data[2] = (uint8_t)(SCSI_blk_nbr - 1 >> 8);
|
||||
MSC_BOT_Data[3] = (uint8_t)(SCSI_blk_nbr - 1);
|
||||
|
||||
MSC_BOT_Data[4] = (uint8_t)(SCSI_blk_size >> 24);
|
||||
@@ -309,9 +309,9 @@ static int8_t SCSI_ReadFormatCapacity(uint8_t lun, uint8_t *params)
|
||||
else
|
||||
{
|
||||
MSC_BOT_Data[3] = 0x08;
|
||||
MSC_BOT_Data[4] = (uint8_t)((blk_nbr - 1) >> 24);
|
||||
MSC_BOT_Data[5] = (uint8_t)((blk_nbr - 1) >> 16);
|
||||
MSC_BOT_Data[6] = (uint8_t)((blk_nbr - 1) >> 8);
|
||||
MSC_BOT_Data[4] = (uint8_t)(blk_nbr - 1 >> 24);
|
||||
MSC_BOT_Data[5] = (uint8_t)(blk_nbr - 1 >> 16);
|
||||
MSC_BOT_Data[6] = (uint8_t)(blk_nbr - 1 >> 8);
|
||||
MSC_BOT_Data[7] = (uint8_t)(blk_nbr - 1);
|
||||
|
||||
MSC_BOT_Data[8] = 0x02;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#define __USBD_CORE_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "../../../STM32_USB_OTG_Driver/inc/usb_dcd.h"
|
||||
#include "usb_dcd.h"
|
||||
#include "usbd_def.h"
|
||||
#include "../../../../../usbd_conf.h"
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#define __USB_CORE_H__
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "../../../../usb_conf.h"
|
||||
#include "../../../../../usb_conf.h"
|
||||
#include "usb_regs.h"
|
||||
#include "usb_defines.h"
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#define __USB_DEF_H__
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "../../../../usb_conf.h"
|
||||
#include "../../../../../usb_conf.h"
|
||||
|
||||
/** @addtogroup USB_OTG_DRIVER
|
||||
* @{
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#define __USB_OTG_REGS_H__
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "../../../../usb_conf.h"
|
||||
#include "../../../../../usb_conf.h"
|
||||
|
||||
|
||||
/** @addtogroup USB_OTG_DRIVER
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "../open9x.h"
|
||||
extern "C" {
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
||||
#include "x9d/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
||||
}
|
||||
|
||||
// TODO needed?
|
||||
@@ -128,7 +128,14 @@ void start_ppm_capture()
|
||||
{
|
||||
}
|
||||
|
||||
#if !defined(SIMU)
|
||||
void usbBootloader()
|
||||
{
|
||||
}
|
||||
|
||||
void usbMassStorage()
|
||||
{
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
USB_OTG_CORE_HANDLE USB_OTG_dev;
|
||||
|
||||
@@ -142,7 +149,6 @@ void usbInit()
|
||||
{
|
||||
USBD_Init(&USB_OTG_dev, USB_OTG_FS_CORE_ID, &USR_desc, &USBD_MSC_cb, &USR_cb);
|
||||
}
|
||||
#endif
|
||||
|
||||
void watchdogInit()
|
||||
{
|
||||
|
||||
@@ -63,6 +63,8 @@ extern "C" {
|
||||
#define TIMER_MULT_APB1 2
|
||||
#define TIMER_MULT_APB2 1
|
||||
|
||||
void usbMassStorage();
|
||||
|
||||
#define JACK_PPM_OUT()
|
||||
#define JACK_PPM_IN()
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ uint32_t pwrCheck()
|
||||
return e_power_on;
|
||||
#if !defined(REV3)
|
||||
else if (GPIO_ReadInputDataBit(GPIOTRNDET, PIN_TRNDET) == Bit_SET)
|
||||
return e_power_trainer;
|
||||
return e_power_trainer;
|
||||
#endif
|
||||
else if (usbPlugged())
|
||||
return e_power_usb;
|
||||
return e_power_usb;
|
||||
else
|
||||
return e_power_off;
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
#define __USB_DESC_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc/usbd_def.h"
|
||||
#include "usbd_def.h"
|
||||
|
||||
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
|
||||
* @{
|
||||
|
||||
Reference in New Issue
Block a user