machine: do not expose RESET_MAGIC_VALUE

This is a constant for internal use only, but was (unintentionally?)
exported. In addition, it doesn't follow the Go naming convention.
This change simply renames the constant so that it is unexported.
This commit is contained in:
Ayke van Laethem
2022-09-19 19:46:38 +02:00
committed by Ron Evans
parent 2409bbef69
commit 107b1c2906
24 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0x07738135
const resetMagicValue = 0x07738135
// GPIO Pins
const (
+1 -1
View File
@@ -7,7 +7,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0x07738135
const resetMagicValue = 0x07738135
// GPIO Pins
const (
+1 -1
View File
@@ -7,7 +7,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0x07738135
const resetMagicValue = 0x07738135
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0x07738135
const resetMagicValue = 0x07738135
// GPIO Pins - Digital Low
const (
+1 -1
View File
@@ -8,7 +8,7 @@ import (
)
// Definition for compatibility, but not used
const RESET_MAGIC_VALUE = 0x00000000
const resetMagicValue = 0x00000000
const (
LED = PC18
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -8,7 +8,7 @@ import (
)
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -245,7 +245,7 @@ const (
// Other peripheral constants
const (
RESET_MAGIC_VALUE = 0xF01669EF // Used to reset into bootloader
resetMagicValue = 0xF01669EF // Used to reset into bootloader
)
// USB CDC pins
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xF01669EF
const resetMagicValue = 0xF01669EF
// Digital pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -7,7 +7,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0x07738135
const resetMagicValue = 0x07738135
// Note: On the P1AM-100, pins D8, D9, D10, A3, and A4 are used for
// communication with the base controller.
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
const (
ADC0 = A0
+1 -1
View File
@@ -4,7 +4,7 @@
package machine
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
const resetMagicValue = 0xf01669ef
// GPIO Pins
const (
+1 -1
View File
@@ -1735,7 +1735,7 @@ func EnterBootloader() {
// Perform magic reset into bootloader, as mentioned in
// https://github.com/arduino/ArduinoCore-samd/issues/197
*(*uint32)(unsafe.Pointer(uintptr(0x20007FFC))) = RESET_MAGIC_VALUE
*(*uint32)(unsafe.Pointer(uintptr(0x20007FFC))) = resetMagicValue
arm.SystemReset()
}
+1 -1
View File
@@ -1975,7 +1975,7 @@ func EnterBootloader() {
// Perform magic reset into bootloader, as mentioned in
// https://github.com/arduino/ArduinoCore-samd/issues/197
*(*uint32)(unsafe.Pointer(uintptr(0x20000000 + HSRAM_SIZE - 4))) = RESET_MAGIC_VALUE
*(*uint32)(unsafe.Pointer(uintptr(0x20000000 + HSRAM_SIZE - 4))) = resetMagicValue
arm.SystemReset()
}