ref: bfc57e306d2ba02c3378b5145de1586de52f7e3a
parent: c60c0cbb4919e1bef859ba53580f42189fa0e455
author: gkostka <kostka.grzegorz@gmail.com>
date: Mon May 12 18:11:27 EDT 2014
Fixed st library warnings
--- a/demos/stm32f429_disco/stm/usb_host/Class/MSC/src/usbh_msc_bot.c
+++ b/demos/stm32f429_disco/stm/usb_host/Class/MSC/src/usbh_msc_bot.c
@@ -366,7 +366,7 @@
USBH_MSC_BOTXferParam.pRxTxBuff = USBH_MSC_CSWData.CSWArray;
USBH_MSC_BOTXferParam.DataLength = USBH_MSC_CSW_MAX_LENGTH;
- for(index = USBH_MSC_CSW_LENGTH; index != 0; index--)
+ for(index = USBH_MSC_CSW_LENGTH - 1; index != 0; index--)
{
USBH_MSC_CSWData.CSWArray[index] = 0;
}
--- a/demos/stm32f429_disco/stm/usb_host/Class/MSC/src/usbh_msc_scsi.c
+++ b/demos/stm32f429_disco/stm/usb_host/Class/MSC/src/usbh_msc_scsi.c
@@ -146,7 +146,7 @@
USBH_MSC_BOTXferParam.DataLength = USBH_MSC_CSW_MAX_LENGTH;
USBH_MSC_BOTXferParam.MSCStateCurrent = USBH_MSC_TEST_UNIT_READY;
- for(index = CBW_CB_LENGTH; index != 0; index--)
+ for(index = CBW_CB_LENGTH - 1; index != 0; index--)
{
USBH_MSC_CBWData.field.CBWCB[index] = 0x00;
}
@@ -218,7 +218,7 @@
USBH_MSC_BOTXferParam.pRxTxBuff = USBH_DataInBuffer;
USBH_MSC_BOTXferParam.MSCStateCurrent = USBH_MSC_READ_CAPACITY10;
- for(index = CBW_CB_LENGTH; index != 0; index--)
+ for(index = CBW_CB_LENGTH - 1; index != 0; index--)
{
USBH_MSC_CBWData.field.CBWCB[index] = 0x00;
}
@@ -304,7 +304,7 @@
USBH_MSC_BOTXferParam.pRxTxBuff = USBH_DataInBuffer;
USBH_MSC_BOTXferParam.MSCStateCurrent = USBH_MSC_MODE_SENSE6;
- for(index = CBW_CB_LENGTH; index != 0; index--)
+ for(index = CBW_CB_LENGTH - 1; index != 0; index--)
{
USBH_MSC_CBWData.field.CBWCB[index] = 0x00;
}
@@ -402,7 +402,7 @@
USBH_MSC_BOTXferParam.MSCStateCurrent = USBH_MSC_REQUEST_SENSE;
- for(index = CBW_CB_LENGTH; index != 0; index--)
+ for(index = CBW_CB_LENGTH - 1; index != 0; index--)
{
USBH_MSC_CBWData.field.CBWCB[index] = 0x00;
}
@@ -494,7 +494,7 @@
USBH_MSC_BOTXferParam.pRxTxBuff = dataBuffer;
- for(index = CBW_CB_LENGTH; index != 0; index--)
+ for(index = CBW_CB_LENGTH - 1; index != 0; index--)
{
USBH_MSC_CBWData.field.CBWCB[index] = 0x00;
}
@@ -584,7 +584,7 @@
USBH_MSC_BOTXferParam.pRxTxBuff = dataBuffer;
- for(index = CBW_CB_LENGTH; index != 0; index--)
+ for(index = CBW_CB_LENGTH - 1; index != 0; index--)
{
USBH_MSC_CBWData.field.CBWCB[index] = 0x00;
}
--- a/demos/stm32f429_disco/stm/usb_otg/src/usb_core.c
+++ b/demos/stm32f429_disco/stm/usb_otg/src/usb_core.c
@@ -1961,7 +1961,7 @@
if(pdev->cfg.low_power)
{
/* un-gate USB Core clock */
- power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL);
+ power.d32 = *pdev->regs.PCGCCTL;
power.b.gatehclk = 0;
power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
@@ -1995,7 +1995,7 @@
if(dsts.b.suspsts == 1)
{
/* un-gate USB Core clock */
- power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL);
+ power.d32 = *pdev->regs.PCGCCTL;
power.b.gatehclk = 0;
power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);
--- a/demos/stm32f429_disco/stm/usb_otg/src/usb_dcd_int.c
+++ b/demos/stm32f429_disco/stm/usb_otg/src/usb_dcd_int.c
@@ -352,7 +352,7 @@
if(pdev->cfg.low_power)
{
/* un-gate USB Core clock */
- power.d32 = USB_OTG_READ_REG32(&pdev->regs.PCGCCTL);
+ power.d32 = *pdev->regs.PCGCCTL;
power.b.gatehclk = 0;
power.b.stoppclk = 0;
USB_OTG_WRITE_REG32(pdev->regs.PCGCCTL, power.d32);