machine: rename CPU_FREQUENCY -> CPUFrequency()

These all-caps constants aren't in the Go style, so rename it to
CPUFrequency (which is more aligned with Go style). Additionally, make
it a function so that it is possible to add support for changing the
frequency in the future.

Tested by running `make smoketest`. None of the outputs did change.
This commit is contained in:
Ayke van Laethem
2019-12-16 19:59:30 +01:00
committed by Ron Evans
parent 2778377ac9
commit 768c652468
13 changed files with 41 additions and 21 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ func main() {
machine.LED.Configure(machine.PinConfig{Mode: machine.PinOutput})
// timer fires 10 times per second
arm.SetupSystemTimer(machine.CPU_FREQUENCY / 10)
arm.SetupSystemTimer(machine.CPUFrequency() / 10)
for {
}