Cosmetics
This commit is contained in:
@@ -100,16 +100,7 @@ void USB_OTG_BSP_DisableInterrupt(USB_OTG_CORE_HANDLE *pdev)
|
|||||||
*/
|
*/
|
||||||
void USB_OTG_BSP_uDelay (const uint32_t usec)
|
void USB_OTG_BSP_uDelay (const uint32_t usec)
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
delay_us(usec);
|
||||||
const uint32_t utime = ((SystemCoreClock/1000000) * usec);
|
|
||||||
do
|
|
||||||
{
|
|
||||||
if ( ++count > utime )
|
|
||||||
{
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -121,7 +112,7 @@ void USB_OTG_BSP_uDelay (const uint32_t usec)
|
|||||||
*/
|
*/
|
||||||
void USB_OTG_BSP_mDelay (const uint32_t msec)
|
void USB_OTG_BSP_mDelay (const uint32_t msec)
|
||||||
{
|
{
|
||||||
USB_OTG_BSP_uDelay(msec * 1000);
|
delay_ms(msec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,15 +21,15 @@
|
|||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "../../opentx.h"
|
#include "../../opentx.h"
|
||||||
#include "../../thirdparty/FatFs/diskio.h"
|
#include "../../thirdparty/FatFs/diskio.h"
|
||||||
#include "../horus/board_horus.h"
|
#include "board_horus.h"
|
||||||
#include "../horus/sdio_sd.h"
|
#include "sdio_sd.h"
|
||||||
|
|
||||||
#if defined(__cplusplus) && !defined(SIMU)
|
#if defined(__cplusplus) && !defined(SIMU)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "usbd_msc_mem.h"
|
#include "usbd_msc_mem.h"
|
||||||
#include "../horus/usb_conf.h"
|
#include "usb_conf.h"
|
||||||
|
|
||||||
/* SD card only when not running bootloader */
|
/* SD card only when not running bootloader */
|
||||||
#define STORAGE_LUN_NBR 1
|
#define STORAGE_LUN_NBR 1
|
||||||
@@ -130,7 +130,7 @@ int8_t STORAGE_GetCapacity (uint8_t lun, uint32_t *block_num, uint32_t *block_si
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lunReady[1] ;
|
uint8_t lunReady[STORAGE_LUN_NBR] ;
|
||||||
|
|
||||||
void usbPluggedIn()
|
void usbPluggedIn()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -171,11 +171,7 @@ int8_t STORAGE_GetCapacity (uint8_t lun, uint32_t *block_num, uint32_t *block_si
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BOOT)
|
uint8_t lunReady[STORAGE_LUN_NBR];
|
||||||
uint8_t lunReady[2] ;
|
|
||||||
#else
|
|
||||||
uint8_t lunReady[1] ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void usbPluggedIn()
|
void usbPluggedIn()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user