mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
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:
committed by
Ron Evans
parent
2409bbef69
commit
107b1c2906
@@ -7,7 +7,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0x07738135
|
||||
const resetMagicValue = 0x07738135
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0x07738135
|
||||
const resetMagicValue = 0x07738135
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0x07738135
|
||||
const resetMagicValue = 0x07738135
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0x07738135
|
||||
const resetMagicValue = 0x07738135
|
||||
|
||||
// GPIO Pins - Digital Low
|
||||
const (
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// Definition for compatibility, but not used
|
||||
const RESET_MAGIC_VALUE = 0x00000000
|
||||
const resetMagicValue = 0x00000000
|
||||
|
||||
const (
|
||||
LED = PC18
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xF01669EF
|
||||
const resetMagicValue = 0xF01669EF
|
||||
|
||||
// Digital pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
const (
|
||||
ADC0 = A0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package machine
|
||||
|
||||
// used to reset into bootloader
|
||||
const RESET_MAGIC_VALUE = 0xf01669ef
|
||||
const resetMagicValue = 0xf01669ef
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user