p3p / pio-framework-arduino-lpc176x

10 stars 20 forks source link

Allow configuring cpu frequency through board_build.f_cpu #54

Open mh-dm opened 1 month ago

mh-dm commented 1 month ago

Allow configuring cpu frequency through the platformio board_build.f_cpu. Fixes the potential bug where someone might try using board_build.f_cpu resulting in an F_CPU that differs from the one actually configured (through LPC_SC->PLL0CFG). F_CPU is used in system/lpc176x/time.h for the delay* functions and is also widely used in projects like Marlin.

Currently only allows 120mhz (LPC1769), 100mhz and 96mhz.