We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48242ba commit 3dd502aCopy full SHA for 3dd502a
src/machine/machine_rp2040_gpio.go
@@ -88,8 +88,8 @@ const (
88
PinSPI
89
)
90
91
-func (p Pin) PortMaskSet() (*volatile.Register32, uint32) {
92
- return &rp.SIO.GPIO_OUT_SET, 1 << p
+func (p Pin) PortMaskSet() (*uint32, uint32) {
+ return (*uint32)(unsafe.Pointer(&rp.SIO.GPIO_OUT_SET)), 1 << p
93
}
94
95
// set drives the pin high
@@ -98,8 +98,8 @@ func (p Pin) set() {
98
rp.SIO.GPIO_OUT_SET.Set(mask)
99
100
101
-func (p Pin) PortMaskClear() (*volatile.Register32, uint32) {
102
- return &rp.SIO.GPIO_OUT_CLR, 1 << p
+func (p Pin) PortMaskClear() (*uint32, uint32) {
+ return (*uint32)(unsafe.Pointer(&rp.SIO.GPIO_OUT_CLR)), 1 << p
103
104
105
// clr drives the pin low
0 commit comments