Skip to content

Commit 58ca12a

Browse files
authored
F1: update sdio.cpp - fix compile error
1 parent 6d884b1 commit 58ca12a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

STM32F1/cores/maple/sdio.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ void sdio_set_clock(uint32_t clk)
118118
* limit the SDIO master clock to 8/3 of PCLK2.See RM 22.3
119119
* Also limited to no more than 48Mhz
120120
*/
121-
clk = min(clk,(SDIOCLK/3)*8);
122-
clk = min(clk,36000000);
121+
clk = min(clk,((uint32_t)SDIOCLK/3)*8);
122+
clk = min(clk,(uint32_t)36000000);
123123

124124
if (clk<1000000) dly = DELAY_LONG;
125125
else dly = DELAY_SHORT;

0 commit comments

Comments
 (0)