Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0b29bd3

Browse files
committed
Fix build issue if SPI2 is not defined.
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent21985ca commit0b29bd3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎cores/arduino/stm32/spi_com.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,17 @@ uint32_t spi_getClkFreqInst(SPI_TypeDef * spi_inst)
131131
/* SPI1, SPI4, SPI5 and SPI6. Source CLK is PCKL2 */
132132
spi_freq=HAL_RCC_GetPCLK2Freq();
133133
break;
134+
#if defined(SPI2_BASE)|| defined (SPI3_BASE)
135+
#if definedSPI2_BASE
134136
case (uint32_t)SPI2:
137+
#endif
135138
#if definedSPI3_BASE
136139
case (uint32_t)SPI3:
137140
#endif
138141
/* SPI_2 and SPI_3. Source CLK is PCKL1 */
139142
spi_freq=HAL_RCC_GetPCLK1Freq();
140143
break;
144+
#endif
141145
default:
142146
printf("CLK: SPI instance not set");
143147
break;

‎platform.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ build.extra_flags=
4444
build.ldscript=ldscript.ld
4545

4646
# These can be overridden in platform.local.txt
47-
compiler.c.extra_flags=
47+
compiler.c.extra_flags=-DENABLE_SERIAL1
4848
compiler.c.elf.extra_flags=
49-
compiler.cpp.extra_flags=
49+
compiler.cpp.extra_flags=-DENABLE_SERIAL1
5050
compiler.S.extra_flags=
5151
compiler.ar.extra_flags=
5252
compiler.elf2hex.extra_flags=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp