mirror of
https://github.com/STMicroelectronics/STM32CubeF4.git
synced 2025-04-24 13:48:53 +08:00
[PRJ][APPS][USBH] Fix stack corruption due to inconsistent type of local variable in MSC_File_Operations()
This commit is contained in:
parent
d5af56388f
commit
40633527d0
@ -191,7 +191,7 @@ static void COMMAND_ProgramFlashMemory(void)
|
|||||||
{
|
{
|
||||||
uint32_t programcounter = 0x00;
|
uint32_t programcounter = 0x00;
|
||||||
uint8_t readflag = TRUE;
|
uint8_t readflag = TRUE;
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* RAM Address Initialization */
|
/* RAM Address Initialization */
|
||||||
RamAddress = (uint32_t) &RAM_Buf;
|
RamAddress = (uint32_t) &RAM_Buf;
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* Register the file system object to the FatFs module */
|
/* Register the file system object to the FatFs module */
|
||||||
if(f_mount(&USBH_fatfs, "", 0) != FR_OK )
|
if(f_mount(&USBH_fatfs, "", 0) != FR_OK )
|
||||||
|
@ -190,7 +190,7 @@ static void COMMAND_ProgramFlashMemory(void)
|
|||||||
{
|
{
|
||||||
uint32_t programcounter = 0x00;
|
uint32_t programcounter = 0x00;
|
||||||
uint8_t readflag = TRUE;
|
uint8_t readflag = TRUE;
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* RAM Address Initialization */
|
/* RAM Address Initialization */
|
||||||
RamAddress = (uint32_t) &RAM_Buf;
|
RamAddress = (uint32_t) &RAM_Buf;
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* Register the file system object to the FatFs module */
|
/* Register the file system object to the FatFs module */
|
||||||
if(f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
if(f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* Register the file system object to the FatFs module */
|
/* Register the file system object to the FatFs module */
|
||||||
if (f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
if (f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* Register the file system object to the FatFs module */
|
/* Register the file system object to the FatFs module */
|
||||||
if (f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
if (f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
||||||
|
@ -196,7 +196,7 @@ static void COMMAND_ProgramFlashMemory(void)
|
|||||||
{
|
{
|
||||||
uint32_t programcounter = 0x00;
|
uint32_t programcounter = 0x00;
|
||||||
uint8_t readflag = TRUE;
|
uint8_t readflag = TRUE;
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* RAM Address Initialization */
|
/* RAM Address Initialization */
|
||||||
RamAddress = (uint32_t) & RAM_Buf;
|
RamAddress = (uint32_t) & RAM_Buf;
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* Register the file system object to the FatFs module */
|
/* Register the file system object to the FatFs module */
|
||||||
if(f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
if(f_mount(&USBH_fatfs, "", 0) != FR_OK)
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext [] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* Register the file system object to the FatFs module */
|
/* Register the file system object to the FatFs module */
|
||||||
if(f_mount(&USBH_fatfs, "", 0 ) != FR_OK )
|
if(f_mount(&USBH_fatfs, "", 0 ) != FR_OK )
|
||||||
|
@ -192,7 +192,7 @@ static void COMMAND_ProgramFlashMemory(void)
|
|||||||
{
|
{
|
||||||
uint32_t programcounter = 0x00;
|
uint32_t programcounter = 0x00;
|
||||||
uint8_t readflag = TRUE;
|
uint8_t readflag = TRUE;
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* RAM Address Initialization */
|
/* RAM Address Initialization */
|
||||||
RamAddress = (uint32_t) &RAM_Buf;
|
RamAddress = (uint32_t) &RAM_Buf;
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ static void COMMAND_ProgramFlashMemory(void)
|
|||||||
{
|
{
|
||||||
uint32_t programcounter = 0x00;
|
uint32_t programcounter = 0x00;
|
||||||
uint8_t readflag = TRUE;
|
uint8_t readflag = TRUE;
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
/* RAM Address Initialization */
|
/* RAM Address Initialization */
|
||||||
RamAddress = (uint32_t) & RAM_Buf;
|
RamAddress = (uint32_t) & RAM_Buf;
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ uint8_t wtext[] = "USB Host Library : Mass Storage Example";
|
|||||||
*/
|
*/
|
||||||
void MSC_File_Operations(void)
|
void MSC_File_Operations(void)
|
||||||
{
|
{
|
||||||
uint16_t bytesread;
|
uint32_t bytesread;
|
||||||
|
|
||||||
LCD_UsrLog("INFO : FatFs Initialized \n");
|
LCD_UsrLog("INFO : FatFs Initialized \n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user