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.
Этот коммит содержится в:
Ayke van Laethem 2022-09-19 19:46:38 +02:00 коммит произвёл Ron Evans
родитель 2409bbef69
коммит 107b1c2906
24 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -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()
}