mt7688

package
v3.6.5+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mt7688 interfaces with the MediaTek MT7688 MIPS CPU used on low cost board.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Present

func Present() bool

Present returns true if a mt7688 processor is detected.

Types

type Pin

type Pin struct {
	// contains filtered or unexported fields
}

Pin is a GPIO number (GPIOnn) on MT7688(AN/KN).

var (
	GPIO0  *Pin // I2S0_DIN
	GPIO1  *Pin // I2S0_DOUT
	GPIO2  *Pin // I2S0_WS
	GPIO3  *Pin // I2S0_SCK
	GPIO4  *Pin // I2C0_SCL
	GPIO5  *Pin // I2C0_SDA
	GPIO6  *Pin // SPI0_CS1, CLK0
	GPIO7  *Pin // SPI0_CLK
	GPIO8  *Pin // SPI0_MOSI
	GPIO9  *Pin // SPI0_MISO
	GPIO10 *Pin // SPI0_CS0
	GPIO11 *Pin // CLK0
	GPIO12 *Pin // UART0_TX
	GPIO13 *Pin // UART0_RX
	GPIO14 *Pin // PWM0
	GPIO15 *Pin // PWM1
	GPIO16 *Pin // UART2_TX
	GPIO17 *Pin // UART2_RX
	GPIO18 *Pin // PWM0
	GPIO19 *Pin // PWM1
	GPIO20 *Pin // UART2_TX, PWM2
	GPIO21 *Pin // UART2_RX, PWM3
	GPIO22 *Pin
	GPIO23 *Pin
	GPIO24 *Pin
	GPIO25 *Pin
	GPIO26 *Pin
	GPIO27 *Pin
	GPIO28 *Pin
	GPIO29 *Pin
	GPIO30 *Pin // JTAG0_TRST (7688KN)
	GPIO31 *Pin // JTAG0_TCK  (7688KN)
	GPIO32 *Pin // JTAG0_TMS  (7688KN)
	GPIO33 *Pin // JTAG0_TDI  (7688KN)
	GPIO34 *Pin // JTAG0_TDO  (7688KN)
	GPIO35 *Pin
	GPIO36 *Pin
	GPIO37 *Pin // CLKO
	GPIO38 *Pin
	GPIO39 *Pin // JTAG0_TRST (7688AN)
	GPIO40 *Pin // JTAG0_TCK  (7688AN)
	GPIO41 *Pin // JTAG0_TMS  (7688AN)
	GPIO42 *Pin // JTAG0_TDI  (7688AN)
	GPIO43 *Pin // JTAG0_TDO  (7688AN)
	GPIO44 *Pin
	GPIO45 *Pin // UART1_TX, PWM0
	GPIO46 *Pin // UART1_RX, PWM1
)

All the pins supported by the CPU.

func (*Pin) DefaultPull

func (p *Pin) DefaultPull() gpio.Pull

DefaultPull implements gpio.PinIn.

func (*Pin) Func

func (p *Pin) Func() pin.Func

Func implements pin.PinFunc.

func (*Pin) Function

func (p *Pin) Function() string

Function implements pin.Pin.

func (*Pin) Halt

func (*Pin) Halt() error

Halt implements conn.Resource.

func (*Pin) In

func (p *Pin) In(pull gpio.Pull, edge gpio.Edge) error

In implements gpio.PinIn.

Not implemented yet.

func (*Pin) Name

func (p *Pin) Name() string

Name implements pin.Pin.

func (*Pin) Number

func (p *Pin) Number() int

Number implements pin.Pin.

This is the GPIO number, not the pin number on a header.

func (*Pin) Out

func (p *Pin) Out(l gpio.Level) error

Out implements gpio.PinOut.

Not implemented yet.

func (*Pin) PWM

func (p *Pin) PWM(duty gpio.Duty, f physic.Frequency) error

PWM implements gpio.PinOut.

Not implemented yet.

func (*Pin) Pull

func (p *Pin) Pull() gpio.Pull

Pull implements gpio.PinIn.

Not implemented yet.

func (*Pin) Read

func (p *Pin) Read() gpio.Level

Read implements gpio.PinIn.

Not implemented yet.

func (*Pin) SetFunc

func (p *Pin) SetFunc(pin.Func) error

SetFunc implements pin.PinFunc.

Not implemented yet.

func (Pin) String

func (p Pin) String() string

String implements conn.Resource.

func (*Pin) SupportedFuncs

func (p *Pin) SupportedFuncs() []pin.Func

SupportedFuncs implements pin.PinFunc.

Not fully implemented yet.

func (*Pin) WaitForEdge

func (p *Pin) WaitForEdge(timeout time.Duration) bool

WaitForEdge implements gpio.PinIn.

Not implemented yet.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL