Skip to content

Commit c675dfe

Browse files
authored
fix mis-spelling of PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK (#1966)
1 parent 761bb1d commit c675dfe

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/rp2_common/hardware_clocks/clocks.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,18 @@ void set_sys_clock_48mhz(void) {
342342
}
343343
}
344344

345-
// PICO_CONFIG: PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK, When the SYS clock PLL is changed keep the peripheral clock attached to it, type=bool, default=0, advanced=true, group=hardware_clocks
346-
#ifndef PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK
345+
// PICO_CONFIG: PICO_CLOCK_ADJUST_PERI_CLOCK_WITH_SYS_CLOCK, When the SYS clock PLL is changed keep the peripheral clock attached to it, type=bool, default=0, advanced=true, group=hardware_clocks
346+
#ifndef PICO_CLOCK_ADJUST_PERI_CLOCK_WITH_SYS_CLOCK
347+
// support old incorrect spelling too
348+
#ifdef PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK
349+
#define PICO_CLOCK_ADJUST_PERI_CLOCK_WITH_SYS_CLOCK PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK
350+
#else
347351
// By default, when reconfiguring the system clock PLL settings after runtime initialization,
348352
// the peripheral clock is switched to the 48MHz USB clock to ensure continuity of peripheral operation.
349353
// Setting this value to 1 changes the behavior to have the peripheral clock re-configured
350354
// to the system clock at it's new frequency.
351-
#define PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK 0
355+
#define PICO_CLOCK_ADJUST_PERI_CLOCK_WITH_SYS_CLOCK 0
356+
#endif
352357
#endif
353358

354359
void set_sys_clock_pll(uint32_t vco_freq, uint post_div1, uint post_div2) {
@@ -374,7 +379,7 @@ void set_sys_clock_pll(uint32_t vco_freq, uint post_div1, uint post_div2) {
374379
CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS,
375380
freq);
376381

377-
#if PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK
382+
#if PICO_CLOCK_ADJUST_PERI_CLOCK_WITH_SYS_CLOCK
378383
clock_configure_undivided(clk_peri,
379384
0,
380385
CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS,

0 commit comments

Comments
 (0)