Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ get an [invite here](https://invite.slack.golangbridge.org/).

[![mascot](https://raw.githubusercontent.com/periph/website/master/site/static/img/periph-mascot-280.png)](https://periph.io/)

[![PkgGoDev](https://pkg.go.dev/badge/periph.io/x/devices/v3)](https://pkg.go.dev/periph.io/x/devices/v3)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/GermanBionicSystems/devices/v3)](https://pkg.go.dev/github.com/GermanBionicSystems/devices/v3)
[![Coverage
Status](https://codecov.io/gh/periph/devices/graph/badge.svg)](https://codecov.io/gh/periph/devices)

Expand Down
2 changes: 1 addition & 1 deletion ads1x15/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/ads1x15"
"github.com/GermanBionicSystems/devices/v3/ads1x15"
"periph.io/x/host/v3"
)

Expand Down
18 changes: 13 additions & 5 deletions apa102/apa102.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ const NeutralTemp uint16 = 6500

// DefaultOpts is the recommended default options.
var DefaultOpts = Opts{
NumPixels: 150, // 150 LEDs is a common strip length.
Intensity: 255, // Full blinding power.
Temperature: 5000, // More pleasing white balance than NeutralTemp.
DisableGlobalPWM: false, // Use full 13 bits range.
NumPixels: 150, // 150 LEDs is a common strip length.
Intensity: 255, // Full blinding power.
Temperature: 5000, // More pleasing white balance than NeutralTemp.
DisableGlobalPWM: false, // Use full 13 bits range.
SpiMode: spi.Mode3, // SPI Mode3 works on most devices.
}

// PassThruOpts makes the driver draw RGB pixels exactly as specified.
Expand All @@ -51,6 +52,7 @@ var PassThruOpts = Opts{
Intensity: 255,
Temperature: NeutralTemp,
DisableGlobalPWM: true,
SpiMode: spi.Mode3,
}

// Opts defines the options for the device.
Expand Down Expand Up @@ -81,6 +83,12 @@ type Opts struct {
// to 8 bits, this also disables the dynamic perceptual mapping of intensity
// since there is not enough bits of resolution to do it effectively.
DisableGlobalPWM bool
// SpiMode sets the clock polarity and phase as one of the 4 possible SPI Modes.
//
// Most devices can use spi.Mode3, but the Raspberry Pi 3 secondary SPI port
// for example does not support this Mode. You may need to use spi.Mode0
// in this and similar cases.
SpiMode spi.Mode
}

// New returns a strip that communicates over SPI to APA102 LEDs.
Expand All @@ -93,7 +101,7 @@ type Opts struct {
// https://en.wikipedia.org/wiki/Flicker_fusion_threshold is a recommended
// reading.
func New(p spi.Port, o *Opts) (*Dev, error) {
c, err := p.Connect(20*physic.MegaHertz, spi.Mode3, 8)
c, err := p.Connect(20*physic.MegaHertz, o.SpiMode, 8)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion apa102/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"log"

"periph.io/x/conn/v3/spi/spireg"
"periph.io/x/devices/v3/apa102"
"github.com/GermanBionicSystems/devices/v3/apa102"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion as7262/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"periph.io/x/conn/v3/physic"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/as7262"
"github.com/GermanBionicSystems/devices/v3/as7262"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion bh1750/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"log"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/bh1750"
"github.com/GermanBionicSystems/devices/v3/bh1750"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion bmxx80/bmx280smoketest/bmx280smoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"periph.io/x/conn/v3/spi"
"periph.io/x/conn/v3/spi/spireg"
"periph.io/x/conn/v3/spi/spitest"
"periph.io/x/devices/v3/bmxx80"
"github.com/GermanBionicSystems/devices/v3/bmxx80"
)

// SmokeTest is imported by periph-smoketest.
Expand Down
2 changes: 1 addition & 1 deletion bmxx80/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/bmxx80"
"github.com/GermanBionicSystems/devices/v3/bmxx80"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion cap1xxx/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/cap1xxx"
"github.com/GermanBionicSystems/devices/v3/cap1xxx"
)

func Example() {
Expand Down
2 changes: 1 addition & 1 deletion ds248x/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"log"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/ds248x"
"github.com/GermanBionicSystems/devices/v3/ds248x"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion ep0099/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/ep0099"
"github.com/GermanBionicSystems/devices/v3/ep0099"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion epd/epd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/spi"
"periph.io/x/devices/v3/ssd1306/image1bit"
"github.com/GermanBionicSystems/devices/v3/ssd1306/image1bit"
"periph.io/x/host/v3/rpi"
)

Expand Down
4 changes: 2 additions & 2 deletions epd/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"image"
"log"

"periph.io/x/devices/v3/epd"
"github.com/GermanBionicSystems/devices/v3/epd"

"periph.io/x/conn/v3/spi/spireg"

"periph.io/x/devices/v3/ssd1306/image1bit"
"github.com/GermanBionicSystems/devices/v3/ssd1306/image1bit"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

module periph.io/x/devices/v3
module github.com/GermanBionicSystems/devices/v3

go 1.13

Expand Down
2 changes: 1 addition & 1 deletion ht16k33/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/ht16k33"
"github.com/GermanBionicSystems/devices/v3/ht16k33"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion ina219/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"log"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/ina219"
"github.com/GermanBionicSystems/devices/v3/ina219"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion ina219/ina219smoketest/ina219smoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/ina219"
"github.com/GermanBionicSystems/devices/v3/ina219"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion inky/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/conn/v3/spi/spireg"
"periph.io/x/devices/v3/inky"
"github.com/GermanBionicSystems/devices/v3/inky"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion lepton/cci/cci.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"periph.io/x/conn/v3/i2c"
"periph.io/x/conn/v3/mmr"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/lepton/internal"
"github.com/GermanBionicSystems/devices/v3/lepton/internal"
)

// StatusBit is the status as returned by the FLIR Lepton.
Expand Down
2 changes: 1 addition & 1 deletion lepton/cci/cci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"periph.io/x/conn/v3/i2c/i2ctest"
"periph.io/x/conn/v3/mmr"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/lepton/internal"
"github.com/GermanBionicSystems/devices/v3/lepton/internal"
)

func TestStatusBit(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions lepton/lepton.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"periph.io/x/conn/v3/i2c"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/spi"
"periph.io/x/devices/v3/lepton/cci"
"periph.io/x/devices/v3/lepton/image14bit"
"periph.io/x/devices/v3/lepton/internal"
"github.com/GermanBionicSystems/devices/v3/lepton/cci"
"github.com/GermanBionicSystems/devices/v3/lepton/image14bit"
"github.com/GermanBionicSystems/devices/v3/lepton/internal"
)

// Metadata is constructed from telemetry data, which is sent with each frame.
Expand Down
4 changes: 2 additions & 2 deletions lepton/lepton_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/spi"
"periph.io/x/conn/v3/spi/spitest"
"periph.io/x/devices/v3/lepton/image14bit"
"periph.io/x/devices/v3/lepton/internal"
"github.com/GermanBionicSystems/devices/v3/lepton/image14bit"
"github.com/GermanBionicSystems/devices/v3/lepton/internal"
)

func TestNew_cs(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion mcp23xxx/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/mcp23xxx"
"github.com/GermanBionicSystems/devices/v3/mcp23xxx"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion mcp9808/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/mcp9808"
"github.com/GermanBionicSystems/devices/v3/mcp9808"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion mcp9808/mcp9808smoketest/mcp9808smoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"fmt"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/mcp9808"
"github.com/GermanBionicSystems/devices/v3/mcp9808"
"periph.io/x/host/v3"
)

Expand Down
4 changes: 2 additions & 2 deletions mfrc522/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"time"

"periph.io/x/conn/v3/spi/spireg"
"periph.io/x/devices/v3/mfrc522"
"periph.io/x/devices/v3/mfrc522/commands"
"github.com/GermanBionicSystems/devices/v3/mfrc522"
"github.com/GermanBionicSystems/devices/v3/mfrc522/commands"
"periph.io/x/host/v3"
"periph.io/x/host/v3/rpi"
)
Expand Down
2 changes: 1 addition & 1 deletion mfrc522/mfrc522.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"periph.io/x/conn/v3"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/spi"
"periph.io/x/devices/v3/mfrc522/commands"
"github.com/GermanBionicSystems/devices/v3/mfrc522/commands"
)

// Dev is an handle to an MFRC522 RFID reader.
Expand Down
2 changes: 1 addition & 1 deletion mpu9250/mpu9250.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"math"
"time"

"periph.io/x/devices/v3/mpu9250/reg"
"github.com/GermanBionicSystems/devices/v3/mpu9250/reg"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pca9685/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/pca9685"
"github.com/GermanBionicSystems/devices/v3/pca9685"
"periph.io/x/host/v3"
)

Expand Down
4 changes: 2 additions & 2 deletions rainbowhat/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/physic"
"periph.io/x/devices/v3/apa102"
"periph.io/x/devices/v3/rainbowhat"
"github.com/GermanBionicSystems/devices/v3/apa102"
"github.com/GermanBionicSystems/devices/v3/rainbowhat"
"periph.io/x/host/v3"
)

Expand Down
6 changes: 3 additions & 3 deletions rainbowhat/rainbowhat.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/conn/v3/spi/spireg"
"periph.io/x/devices/v3/apa102"
"periph.io/x/devices/v3/bmxx80"
"periph.io/x/devices/v3/ht16k33"
"github.com/GermanBionicSystems/devices/v3/apa102"
"github.com/GermanBionicSystems/devices/v3/bmxx80"
"github.com/GermanBionicSystems/devices/v3/ht16k33"
"periph.io/x/host/v3/rpi"
)

Expand Down
2 changes: 1 addition & 1 deletion sn3218/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/sn3218"
"github.com/GermanBionicSystems/devices/v3/sn3218"
"periph.io/x/host/v3"
)

Expand Down
4 changes: 2 additions & 2 deletions ssd1306/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"log"

"periph.io/x/conn/v3/i2c/i2creg"
"periph.io/x/devices/v3/ssd1306"
"periph.io/x/devices/v3/ssd1306/image1bit"
"github.com/GermanBionicSystems/devices/v3/ssd1306"
"github.com/GermanBionicSystems/devices/v3/ssd1306/image1bit"
"periph.io/x/host/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion ssd1306/ssd1306.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"periph.io/x/conn/v3/i2c"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/spi"
"periph.io/x/devices/v3/ssd1306/image1bit"
"github.com/GermanBionicSystems/devices/v3/ssd1306/image1bit"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion ssd1306/ssd1306_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/spi"
"periph.io/x/conn/v3/spi/spitest"
"periph.io/x/devices/v3/ssd1306/image1bit"
"github.com/GermanBionicSystems/devices/v3/ssd1306/image1bit"
)

func TestNewI2C_fail(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions ssd1306/ssd1306smoketest/ssd1306smoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"periph.io/x/conn/v3/spi"
"periph.io/x/conn/v3/spi/spireg"
"periph.io/x/conn/v3/spi/spitest"
"periph.io/x/devices/v3/ssd1306"
"periph.io/x/devices/v3/ssd1306/image1bit"
"github.com/GermanBionicSystems/devices/v3/ssd1306"
"github.com/GermanBionicSystems/devices/v3/ssd1306/image1bit"
)

// SmokeTest is imported by periph-smoketest.
Expand Down
2 changes: 1 addition & 1 deletion st7567/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/conn/v3/spi/spireg"
"periph.io/x/devices/v3/st7567"
"github.com/GermanBionicSystems/devices/v3/st7567"
"periph.io/x/host/v3"
)

Expand Down
Loading