mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
board: Adafruit MacroPad RP2040
This commit is contained in:
@@ -88,12 +88,20 @@ const (
|
||||
PinSPI
|
||||
)
|
||||
|
||||
func (p Pin) PortMaskSet() (*volatile.Register32, uint32) {
|
||||
return &rp.SIO.GPIO_OUT_SET, 1 << p
|
||||
}
|
||||
|
||||
// set drives the pin high
|
||||
func (p Pin) set() {
|
||||
mask := uint32(1) << p
|
||||
rp.SIO.GPIO_OUT_SET.Set(mask)
|
||||
}
|
||||
|
||||
func (p Pin) PortMaskClear() (*volatile.Register32, uint32) {
|
||||
return &rp.SIO.GPIO_OUT_CLR, 1 << p
|
||||
}
|
||||
|
||||
// clr drives the pin low
|
||||
func (p Pin) clr() {
|
||||
mask := uint32(1) << p
|
||||
|
||||
Reference in New Issue
Block a user