chore: fix build warnings from compiler-flagged always-true/dead-code issues (#7697)
Co-authored-by: Peter Feerick <5500713+pfeerick@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Peter Feerick
Claude Sonnet 5
parent
5d69da66fe
commit
a5ac9bf06b
@@ -110,7 +110,6 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
{
|
||||
FMC_SDRAM_CommandTypeDef FMC_SDRAMCommandStructure;
|
||||
uint32_t tmpr = 0;
|
||||
uint32_t timeout = SDRAM_TIMEOUT;
|
||||
|
||||
/* Step 3 --------------------------------------------------------------------*/
|
||||
/* Configure a clock configuration enable command */
|
||||
@@ -118,12 +117,6 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
FMC_SDRAMCommandStructure.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
|
||||
FMC_SDRAMCommandStructure.AutoRefreshNumber = 1;
|
||||
FMC_SDRAMCommandStructure.ModeRegisterDefinition = 0;
|
||||
/* Wait until the SDRAM controller is ready */
|
||||
// while((__FMC_SDRAM_GET_FLAG(FMC_Bank5_6_R, FMC_SDRAM_FLAG_BUSY) != 0) &&
|
||||
// (timeout > 0))
|
||||
// {
|
||||
// timeout--;
|
||||
// }
|
||||
/* Send the command */
|
||||
FMC_SDRAM_SendCommand(FMC_Bank5_6_R, &FMC_SDRAMCommandStructure, 10);
|
||||
|
||||
@@ -137,15 +130,8 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
FMC_SDRAMCommandStructure.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1;
|
||||
FMC_SDRAMCommandStructure.AutoRefreshNumber = 1;
|
||||
FMC_SDRAMCommandStructure.ModeRegisterDefinition = 0;
|
||||
/* Wait until the SDRAM controller is ready */
|
||||
// timeout = SDRAM_TIMEOUT;
|
||||
// while((__FMC_SDRAM_GET_FLAG(FMC_Bank5_6_R, FMC_SDRAM_FLAG_BUSY) != 0) && (timeout > 0))
|
||||
// {
|
||||
// timeout--;
|
||||
// }
|
||||
/* Send the command */
|
||||
FMC_SDRAM_SendCommand(FMC_Bank5_6_R, &FMC_SDRAMCommandStructure, 10);
|
||||
// delay_ms(1);
|
||||
|
||||
/* Step 6 --------------------------------------------------------------------*/
|
||||
/* Configure a Auto-Refresh command */
|
||||
@@ -154,16 +140,8 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
FMC_SDRAMCommandStructure.AutoRefreshNumber = 8;
|
||||
FMC_SDRAMCommandStructure.ModeRegisterDefinition = 0;
|
||||
|
||||
/* Wait until the SDRAM controller is ready */
|
||||
// timeout = SDRAM_TIMEOUT;
|
||||
// while((__FMC_SDRAM_GET_FLAG(FMC_Bank5_6_R, FMC_SDRAM_FLAG_BUSY) != 0) &&
|
||||
// (timeout > 0))
|
||||
// {
|
||||
// timeout--;
|
||||
// }
|
||||
/* Send the command */
|
||||
FMC_SDRAM_SendCommand(FMC_Bank5_6_R, &FMC_SDRAMCommandStructure, 10);
|
||||
// delay_ms(1);
|
||||
|
||||
/* Step 7 --------------------------------------------------------------------*/
|
||||
/* Program the external memory mode register */
|
||||
@@ -179,15 +157,8 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
FMC_SDRAMCommandStructure.AutoRefreshNumber = 1;
|
||||
FMC_SDRAMCommandStructure.ModeRegisterDefinition = tmpr;
|
||||
|
||||
/* Wait until the SDRAM controller is ready */
|
||||
// timeout = SDRAM_TIMEOUT;
|
||||
// while((__FMC_SDRAM_GET_FLAG(FMC_Bank5_6_R, FMC_SDRAM_FLAG_BUSY) != 0) && (timeout > 0))
|
||||
// {
|
||||
// timeout--;
|
||||
// }
|
||||
/* Send the command */
|
||||
FMC_SDRAM_SendCommand(FMC_Bank5_6_R, &FMC_SDRAMCommandStructure, 10);
|
||||
// delay_ms(1);
|
||||
|
||||
/* Step 8 --------------------------------------------------------------------*/
|
||||
/* Set the refresh rate counter */
|
||||
@@ -195,13 +166,6 @@ extern "C" void SDRAM_InitSequence(void)
|
||||
/* Set the device refresh counter */
|
||||
FMC_SDRAM_SetAutoRefreshNumber(FMC_Bank5_6_R, 15);
|
||||
FMC_SDRAM_ProgramRefreshRate(FMC_Bank5_6_R, 1855);
|
||||
/* Wait until the SDRAM controller is ready */
|
||||
// timeout = SDRAM_TIMEOUT;
|
||||
// while((__FMC_SDRAM_GET_FLAG(FMC_Bank5_6_R, FMC_SDRAM_FLAG_BUSY) != 0) && (timeout > 0))
|
||||
// {
|
||||
// timeout--;
|
||||
// }
|
||||
// delay_ms(1);
|
||||
}
|
||||
|
||||
extern "C" void SDRAM_Init(void)
|
||||
|
||||
Reference in New Issue
Block a user