Versions in this module Expand all Collapse all v0 v0.1.2 Jan 4, 2020 Changes in this version type Periph + func SPI(n int) *Periph v0.1.1 Dec 17, 2019 Changes in this version + var SPI0 = (*Periph)(unsafe.Pointer(mmap.APB_BASE + 0x03000)) + var SPI1 = (*Periph)(unsafe.Pointer(mmap.APB_BASE + 0x04000)) + type Config byte + const CPHA0 + const CPHA1 + const CPOL0 + const CPOL1 + const LSBF + const MSBF + type Driver struct + P *Periph + func NewDriver(p *Periph) *Driver + func (d *Driver) AsyncRepeatByte(b byte, n int) + func (d *Driver) AsyncRepeatWord16(w uint16, n int) + func (d *Driver) AsyncWriteRead(out, in []byte) + func (d *Driver) AsyncWriteRead16(out, in []uint16) + func (d *Driver) AsyncWriteStringRead(out string, in []byte) + func (d *Driver) Disable() + func (d *Driver) Enable() + func (d *Driver) ISR() + func (d *Driver) RepeatByte(b byte, n int) + func (d *Driver) RepeatWord16(w uint16, n int) + func (d *Driver) Wait() int + func (d *Driver) WriteRead(out, in []byte) int + func (d *Driver) WriteRead16(out, in []uint16) int + func (d *Driver) WriteReadByte(b byte) byte + func (d *Driver) WriteReadMany(oi ...[]byte) int + func (d *Driver) WriteReadMany16(oi ...[]uint16) int + func (d *Driver) WriteReadWord16(w uint16) uint16 + func (d *Driver) WriteStringRead(out string, in []byte) int + type Event byte + const READY + type Freq uint32 + const Freq125k + const Freq1M + const Freq250k + const Freq2M + const Freq4M + const Freq500k + const Freq8M + type Periph struct + func (p *Periph) Event(e Event) *te.Event + func (p *Periph) LoadCONFIG() Config + func (p *Periph) LoadENABLE() bool + func (p *Periph) LoadFREQUENCY() Freq + func (p *Periph) LoadPSEL(s Signal) gpio.Pin + func (p *Periph) LoadRXD() byte + func (p *Periph) StoreCONFIG(c Config) + func (p *Periph) StoreENABLE(en bool) + func (p *Periph) StoreFREQUENCY(f Freq) + func (p *Periph) StorePSEL(s Signal, pin gpio.Pin) + func (p *Periph) StoreTXD(b byte) + type Signal byte + const MISO + const MOSI + const SCK