Skip to content

Commit 41102e8

Browse files
author
Adrian Negreanu
committed
lpc43xx_hic,system: use defines where possible
1 parent ae9a51d commit 41102e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/hic_hal/nxp/lpc4322/system_LPC43xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ static void SetClock (void) {
465465

466466
/* CPU base clock is in the mid frequency range before final clock set */
467467
LPC_CGU->BASE_M4_CLK = (0x01 << 11) | /* Autoblock En */
468-
(0x09 << 24) ; /* Clock source: PLL1 */
468+
(CLK_SRC_PLL1 << 24) ; /* Clock source: PLL1 */
469469

470470
/* Wait 20us */
471471
WaitUs(20, (CLK_XTAL * (PLL1_MSEL + 1)) / ((PLL1_NSEL + 1) * 2));
@@ -576,7 +576,7 @@ uint32_t MeasureFreq (uint32_t clk_sel) {
576576
}
577577
}
578578
fcnt = (LPC_CGU->FREQ_MON >> 9) & 0x3FFF;
579-
fout = fcnt * (12000000U/511U); /* FCNT * (IRC_CLK / RCNT) */
579+
fout = fcnt * (CLK_IRC/511U); /* FCNT * (IRC_CLK / RCNT) */
580580

581581
return (fout);
582582
}

0 commit comments

Comments
 (0)