Documentation
¶
Index ¶
- Constants
- type AltFunc
- type Config
- type Pin
- func (p Pin) AltFunc() AltFunc
- func (p Pin) ClearIRQ(condition uint8)
- func (p Pin) Config() Config
- func (p Pin) DstIRQ(dst int16) (condition uint8)
- func (p Pin) IRQ() (condition uint8)
- func (p Pin) SetAltFunc(af AltFunc)
- func (p Pin) SetDstIRQ(dst int16, condition uint8)
- func (p Pin) Setup(cfg Config)
Constants ¶
View Source
const ( Proc0 int16 = 0 // Processor 0 Proc1 int16 = 1 // Processor 1 DormantWake int16 = 2 // Wake ROSC or XOSC from dormant mode )
IRQ destination.
View Source
const ( LevelLow uint8 = 1 << 0 // IRQ when high level LevelHigh uint8 = 1 << 1 // IRQ when low level EdgeLow uint8 = 1 << 2 // IRQ when transition from high to low EdgeHigh uint8 = 1 << 3 // IRQ when transition from low to high )
IRQ condition.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AltFunc ¶
type AltFunc uint32
AltFunc represents a mux mode.
const ( Func AltFunc = 0x1F // Selects pin function F0 AltFunc = 1 F1 AltFunc = 2 F2 AltFunc = 3 F3 AltFunc = 4 F4 AltFunc = 5 F5 AltFunc = 6 F6 AltFunc = 7 F7 AltFunc = 8 F8 AltFunc = 9 F9 AltFunc = 10 F10 AltFunc = 11 F11 AltFunc = 12 HSTX = F0 SPI = F1 UART = F2 I2C = F3 PWM = F4 GPIO = F5 PIO0 = F6 PIO1 = F7 PIO2 = F8 USB = F10 UART_AUX = F11 OutOver AltFunc = 3 << 12 // Peripheral output override OutNormal AltFunc = 0 << 12 // normal OutInvert AltFunc = 1 << 12 // inverted OutLow AltFunc = 2 << 12 // force low OutHigh AltFunc = 3 << 12 // force high OEOver AltFunc = 3 << 14 // Peripheral output enable override OENormal AltFunc = 0 << 14 // direct OEInvert AltFunc = 1 << 14 // inverted OEDisable AltFunc = 2 << 14 // force disabled OEEnable AltFunc = 3 << 14 // force enabled InpOver AltFunc = 3 << 16 // Peripheral input override InpNormal AltFunc = 0 << 16 // normal InpInvert AltFunc = 1 << 16 // inverted InpLow AltFunc = 2 << 16 // force low InpHigh AltFunc = 3 << 16 // force high IRQOver AltFunc = 3 << 28 // Interrupt override IRQNormal AltFunc = 0 << 28 // normal IRQInvert AltFunc = 1 << 28 // inverted IRQLow AltFunc = 2 << 28 // force low IRQHigh AltFunc = 3 << 28 // force high )
type Config ¶
type Config uint32
const ( FastSR Config = 1 << 0 // Enable fast slew rate Schmitt Config = 1 << 1 // Enable schmitt trigger PullDown Config = 1 << 2 // Pull down enable PullUp Config = 1 << 3 // Pull up enable Drive Config = 3 << 4 // Drive strength D2mA Config = 0 << 4 // 2 mA D4mA Config = 1 << 4 // 4 mA D8mA Config = 2 << 4 // 8 mA D12mA Config = 3 << 4 // 12 mA InpEn Config = 1 << 6 // Input enable OutDis Config = 1 << 7 // Output disable ISO Config = 1 << 8 // Pad isolation control. )
type Pin ¶
type Pin int16
Pin represents an I/O pin (pad).
func (Pin) ClearIRQ ¶
IRQ clears the active IRQ condition for pin. Only edge conditions can be cleared.
Click to show internal directories.
Click to hide internal directories.