Fix Error: board/stm32_selectsram.c:163:13: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
FSMC_BTR_ADDHLD(SRAM_ADDRESS_HOLD_TIME) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /github/workspace/sources/nuttx/arch/arm/src/chip/hardware/stm32_fsmc.h:164:42: note: expanded from macro 'FSMC_BTR_ADDHLD' ^ /github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:135:54: note: expanded from macro 'putreg32' ^ Error: board/stm32_selectsram.c:166:13: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] FSMC_BTR_CLKDIV(SRAM_CLK_DIVISION) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /github/workspace/sources/nuttx/arch/arm/src/chip/hardware/stm32_fsmc.h:176:42: note: expanded from macro 'FSMC_BTR_CLKDIV' ^ /github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:135:54: note: expanded from macro 'putreg32' ^ Error: board/stm32_selectsram.c:167:13: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] FSMC_BTR_DATLAT(SRAM_DATA_LATENCY) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /github/workspace/sources/nuttx/arch/arm/src/chip/hardware/stm32_fsmc.h:180:42: note: expanded from macro 'FSMC_BTR_DATLAT' ^ /github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:135:54: note: expanded from macro 'putreg32' Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
81b9df53fc
commit
30a01ab551
@ -295,8 +295,8 @@ static void stm32_selectlcd(void)
|
|||||||
|
|
||||||
/* Bank1 NOR/SRAM timing register configuration */
|
/* Bank1 NOR/SRAM timing register configuration */
|
||||||
|
|
||||||
putreg32(FSMC_BTR_ADDSET(2) | FSMC_BTR_ADDHLD(0) | FSMC_BTR_DATAST(2) |
|
putreg32(FSMC_BTR_ADDSET(2) | FSMC_BTR_ADDHLD(1) | FSMC_BTR_DATAST(2) |
|
||||||
FSMC_BTR_BUSTURN(0) | FSMC_BTR_CLKDIV(1) | FSMC_BTR_DATLAT(2) |
|
FSMC_BTR_BUSTURN(1) | FSMC_BTR_CLKDIV(1) | FSMC_BTR_DATLAT(2) |
|
||||||
FSMC_BTR_ACCMODA,
|
FSMC_BTR_ACCMODA,
|
||||||
STM32_FSMC_BTR1);
|
STM32_FSMC_BTR1);
|
||||||
|
|
||||||
|
@ -374,8 +374,8 @@ static void stm32_selectlcd(void)
|
|||||||
|
|
||||||
/* Bank1 NOR/SRAM timing register configuration */
|
/* Bank1 NOR/SRAM timing register configuration */
|
||||||
|
|
||||||
putreg32(FSMC_BTR_ADDSET(1) | FSMC_BTR_ADDHLD(0) | FSMC_BTR_DATAST(2) |
|
putreg32(FSMC_BTR_ADDSET(1) | FSMC_BTR_ADDHLD(1) | FSMC_BTR_DATAST(2) |
|
||||||
FSMC_BTR_BUSTURN(0) | FSMC_BTR_CLKDIV(1) | FSMC_BTR_DATLAT(2) |
|
FSMC_BTR_BUSTURN(1) | FSMC_BTR_CLKDIV(1) | FSMC_BTR_DATLAT(2) |
|
||||||
FSMC_BTR_ACCMODA,
|
FSMC_BTR_ACCMODA,
|
||||||
STM32_FSMC_BTR1);
|
STM32_FSMC_BTR1);
|
||||||
|
|
||||||
|
@ -53,11 +53,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define SRAM_ADDRESS_SETUP_TIME 3
|
#define SRAM_ADDRESS_SETUP_TIME 3
|
||||||
#define SRAM_ADDRESS_HOLD_TIME 0
|
#define SRAM_ADDRESS_HOLD_TIME 1
|
||||||
#define SRAM_DATA_SETUP_TIME 6
|
#define SRAM_DATA_SETUP_TIME 6
|
||||||
#define SRAM_BUS_TURNAROUND_DURATION 1
|
#define SRAM_BUS_TURNAROUND_DURATION 1
|
||||||
#define SRAM_CLK_DIVISION 0
|
#define SRAM_CLK_DIVISION 1
|
||||||
#define SRAM_DATA_LATENCY 0
|
#define SRAM_DATA_LATENCY 2
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
|
@ -45,11 +45,11 @@
|
|||||||
/* SRAM Timing */
|
/* SRAM Timing */
|
||||||
|
|
||||||
#define SRAM_ADDRESS_SETUP_TIME 3
|
#define SRAM_ADDRESS_SETUP_TIME 3
|
||||||
#define SRAM_ADDRESS_HOLD_TIME 0
|
#define SRAM_ADDRESS_HOLD_TIME 1
|
||||||
#define SRAM_DATA_SETUP_TIME 6
|
#define SRAM_DATA_SETUP_TIME 6
|
||||||
#define SRAM_BUS_TURNAROUND_DURATION 1
|
#define SRAM_BUS_TURNAROUND_DURATION 1
|
||||||
#define SRAM_CLK_DIVISION 0
|
#define SRAM_CLK_DIVISION 1
|
||||||
#define SRAM_DATA_LATENCY 0
|
#define SRAM_DATA_LATENCY 2
|
||||||
|
|
||||||
/* SRAM pin definitions */
|
/* SRAM pin definitions */
|
||||||
|
|
||||||
|
@ -45,11 +45,11 @@
|
|||||||
/* SRAM Timing */
|
/* SRAM Timing */
|
||||||
|
|
||||||
#define SRAM_ADDRESS_SETUP_TIME 3
|
#define SRAM_ADDRESS_SETUP_TIME 3
|
||||||
#define SRAM_ADDRESS_HOLD_TIME 0
|
#define SRAM_ADDRESS_HOLD_TIME 1
|
||||||
#define SRAM_DATA_SETUP_TIME 6
|
#define SRAM_DATA_SETUP_TIME 6
|
||||||
#define SRAM_BUS_TURNAROUND_DURATION 1
|
#define SRAM_BUS_TURNAROUND_DURATION 1
|
||||||
#define SRAM_CLK_DIVISION 0
|
#define SRAM_CLK_DIVISION 1
|
||||||
#define SRAM_DATA_LATENCY 0
|
#define SRAM_DATA_LATENCY 2
|
||||||
|
|
||||||
/* SRAM pin definitions */
|
/* SRAM pin definitions */
|
||||||
|
|
||||||
|
@ -443,8 +443,8 @@ static void stm32_selectlcd(void)
|
|||||||
/* Bank1 NOR/SRAM timing register configuration */
|
/* Bank1 NOR/SRAM timing register configuration */
|
||||||
|
|
||||||
putreg32(
|
putreg32(
|
||||||
FSMC_BTR_ADDSET(1) | FSMC_BTR_ADDHLD(0) |
|
FSMC_BTR_ADDSET(1) | FSMC_BTR_ADDHLD(1) |
|
||||||
FSMC_BTR_DATAST(2) | FSMC_BTR_BUSTURN(0) |
|
FSMC_BTR_DATAST(2) | FSMC_BTR_BUSTURN(1) |
|
||||||
FSMC_BTR_CLKDIV(1) | FSMC_BTR_DATLAT(2) |
|
FSMC_BTR_CLKDIV(1) | FSMC_BTR_DATLAT(2) |
|
||||||
FSMC_BTR_ACCMODA,
|
FSMC_BTR_ACCMODA,
|
||||||
STM32_FSMC_BTR1);
|
STM32_FSMC_BTR1);
|
||||||
|
Loading…
Reference in New Issue
Block a user