chore: move _embdemo to _demo
This commit is contained in:
16
_demo/embed/esp32/watchdog/watchdog.go
Normal file
16
_demo/embed/esp32/watchdog/watchdog.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package watchdog
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
//go:linkname StoreUint32 llgo.atomicStore
|
||||
func StoreUint32(addr *uint32, val uint32)
|
||||
|
||||
func Disable() {
|
||||
StoreUint32((*uint32)(unsafe.Pointer(uintptr(0x3ff480A4))), 0x50D83AA1)
|
||||
|
||||
StoreUint32((*uint32)(unsafe.Pointer(uintptr(0x3ff4808C))), 0)
|
||||
StoreUint32((*uint32)(unsafe.Pointer(uintptr(0x3ff5f048))), 0)
|
||||
}
|
||||
Reference in New Issue
Block a user