Skip to content

Commit

Permalink
Migrate to v3
Browse files Browse the repository at this point in the history
Announcement to follow soon.
  • Loading branch information
maruel committed Dec 30, 2020
1 parent fc8f190 commit 17c4f52
Show file tree
Hide file tree
Showing 83 changed files with 251 additions and 247 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Documentation is at https://periph.io

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

Expand All @@ -22,9 +22,9 @@ package main

import (
"time"
"periph.io/x/conn/gpio"
"periph.io/x/host"
"periph.io/x/host/rpi"
"periph.io/x/conn/v3/gpio"
"periph.io/x/host/v3"
"periph.io/x/host/v3/rpi"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions allwinner/a20.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package allwinner
import (
"strings"

"periph.io/x/conn/pin"
"periph.io/x/host/sysfs"
"periph.io/x/conn/v3/pin"
"periph.io/x/host/v3/sysfs"
)

// mappingA20 describes the mapping of the A20 processor gpios to their
Expand Down
4 changes: 2 additions & 2 deletions allwinner/a64.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package allwinner
import (
"strings"

"periph.io/x/conn/pin"
"periph.io/x/host/sysfs"
"periph.io/x/conn/v3/pin"
"periph.io/x/host/v3/sysfs"
)

// A64 specific pins.
Expand Down
8 changes: 4 additions & 4 deletions allwinner/allwinnersmoketest/allwinnersmoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"fmt"
"time"

"periph.io/x/conn/gpio"
"periph.io/x/host/allwinner"
"periph.io/x/host/chip"
"periph.io/x/host/pine64"
"periph.io/x/conn/v3/gpio"
"periph.io/x/host/v3/allwinner"
"periph.io/x/host/v3/chip"
"periph.io/x/host/v3/pine64"
)

// SmokeTest is imported by periph-smoketest.
Expand Down
6 changes: 3 additions & 3 deletions allwinner/allwinnersmoketest/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"flag"
"fmt"

"periph.io/x/conn/gpio"
"periph.io/x/conn/gpio/gpioreg"
"periph.io/x/host/allwinner"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/host/v3/allwinner"
)

// Benchmark is imported by periph-smoketest.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package allwinnersmoketest
import (
"testing"

"periph.io/x/conn/gpio"
"periph.io/x/conn/v3/gpio"
)

// runFastGPIOBenchmark runs the standardized GPIO benchmark for this specific
Expand Down
4 changes: 2 additions & 2 deletions allwinner/allwinnersmoketest/benchmark_gpio_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"testing"
"time"

"periph.io/x/conn/gpio"
"periph.io/x/conn/physic"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/physic"
)

// runGPIOBenchmark runs the standardized GPIO benchmark for this specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"periph.io/x/conn/physic"
"periph.io/x/conn/v3/physic"
)

func TestToHz(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion allwinner/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"sync"

"periph.io/x/host/distro"
"periph.io/x/host/v3/distro"
)

// Present detects whether the host CPU is an Allwinner CPU.
Expand Down
4 changes: 2 additions & 2 deletions allwinner/dma.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"log"
"os"

"periph.io/x/conn/driver/driverreg"
"periph.io/x/host/pmem"
"periph.io/x/conn/v3/driver/driverreg"
"periph.io/x/host/v3/pmem"
)

// dmaMap represents the DMA memory mapped CPU registers.
Expand Down
14 changes: 7 additions & 7 deletions allwinner/gpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import (
"strings"
"time"

"periph.io/x/conn/driver/driverreg"
"periph.io/x/conn/gpio"
"periph.io/x/conn/gpio/gpioreg"
"periph.io/x/conn/physic"
"periph.io/x/conn/pin"
"periph.io/x/host/pmem"
"periph.io/x/host/sysfs"
"periph.io/x/conn/v3/driver/driverreg"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/pin"
"periph.io/x/host/v3/pmem"
"periph.io/x/host/v3/sysfs"
)

// List of all known pins. These global variables can be used directly.
Expand Down
14 changes: 7 additions & 7 deletions allwinner/gpio_pl.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (
"strings"
"time"

"periph.io/x/conn/driver/driverreg"
"periph.io/x/conn/gpio"
"periph.io/x/conn/gpio/gpioreg"
"periph.io/x/conn/physic"
"periph.io/x/conn/pin"
"periph.io/x/host/pmem"
"periph.io/x/host/sysfs"
"periph.io/x/conn/v3/driver/driverreg"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/pin"
"periph.io/x/host/v3/pmem"
"periph.io/x/host/v3/sysfs"
)

// All the pins in the PL group.
Expand Down
4 changes: 2 additions & 2 deletions allwinner/r8.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package allwinner
import (
"strings"

"periph.io/x/conn/pin"
"periph.io/x/host/sysfs"
"periph.io/x/conn/v3/pin"
"periph.io/x/host/v3/sysfs"
)

// R8 specific pins.
Expand Down
2 changes: 1 addition & 1 deletion allwinner/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package allwinner
import (
"time"

"periph.io/x/host/cpu"
"periph.io/x/host/v3/cpu"
)

// ReadTime returns the time on a monotonic timer.
Expand Down
4 changes: 2 additions & 2 deletions am335x/am335x.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"errors"
"strings"

"periph.io/x/conn/driver/driverreg"
"periph.io/x/host/distro"
"periph.io/x/conn/v3/driver/driverreg"
"periph.io/x/host/v3/distro"
)

// Present returns true if a TM AM335x processor is detected.
Expand Down
2 changes: 1 addition & 1 deletion bcm283x/bcm283x_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package bcm283x

import "periph.io/x/host/fs"
import "periph.io/x/host/v3/fs"

func init() {
fs.Inhibit()
Expand Down
12 changes: 6 additions & 6 deletions bcm283x/bcm283xsmoketest/bcm283xsmoketest.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import (
"regexp"
"time"

"periph.io/x/conn/gpio"
"periph.io/x/conn/gpio/gpioreg"
"periph.io/x/conn/gpio/gpiostream"
"periph.io/x/conn/physic"
"periph.io/x/conn/pin"
"periph.io/x/host/bcm283x"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/conn/v3/gpio/gpiostream"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/pin"
"periph.io/x/host/v3/bcm283x"
)

// SmokeTest is imported by periph-smoketest.
Expand Down
6 changes: 3 additions & 3 deletions bcm283x/bcm283xsmoketest/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"flag"
"fmt"

"periph.io/x/conn/gpio"
"periph.io/x/conn/gpio/gpioreg"
"periph.io/x/host/bcm283x"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/host/v3/bcm283x"
)

// Benchmark is imported by periph-smoketest.
Expand Down
2 changes: 1 addition & 1 deletion bcm283x/bcm283xsmoketest/benchmark_fast_gpio_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package bcm283xsmoketest
import (
"testing"

"periph.io/x/conn/gpio"
"periph.io/x/conn/v3/gpio"
)

// runFastGPIOBenchmark runs the standardized GPIO benchmark for this specific
Expand Down
4 changes: 2 additions & 2 deletions bcm283x/bcm283xsmoketest/benchmark_gpio_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"testing"
"time"

"periph.io/x/conn/gpio"
"periph.io/x/conn/physic"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/physic"
)

// runGPIOBenchmark runs the standardized GPIO benchmark for this specific
Expand Down
2 changes: 1 addition & 1 deletion bcm283x/bcm283xsmoketest/benchmark_gpio_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"periph.io/x/conn/physic"
"periph.io/x/conn/v3/physic"
)

func TestToHz(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion bcm283x/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"periph.io/x/conn/physic"
"periph.io/x/conn/v3/physic"
)

// errClockRegister is returned in a situation where the clock memory is not
Expand Down
2 changes: 1 addition & 1 deletion bcm283x/clock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"

"periph.io/x/conn/physic"
"periph.io/x/conn/v3/physic"
)

func TestClockDiv_String(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions bcm283x/dma.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ import (
"strings"
"time"

"periph.io/x/conn/driver/driverreg"
"periph.io/x/conn/gpio/gpiostream"
"periph.io/x/conn/physic"
"periph.io/x/host/pmem"
"periph.io/x/host/videocore"
"periph.io/x/conn/v3/driver/driverreg"
"periph.io/x/conn/v3/gpio/gpiostream"
"periph.io/x/conn/v3/physic"
"periph.io/x/host/v3/pmem"
"periph.io/x/host/v3/videocore"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions bcm283x/dma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"reflect"
"testing"

"periph.io/x/conn/gpio/gpiostream"
"periph.io/x/conn/physic"
"periph.io/x/conn/v3/gpio/gpiostream"
"periph.io/x/conn/v3/physic"
)

func TestDmaStatus_String(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions bcm283x/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"fmt"
"log"

"periph.io/x/conn/physic"
"periph.io/x/host"
"periph.io/x/host/bcm283x"
"periph.io/x/conn/v3/physic"
"periph.io/x/host/v3"
"periph.io/x/host/v3/bcm283x"
)

func ExamplePinsRead0To31() {
Expand Down
20 changes: 10 additions & 10 deletions bcm283x/gpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import (
"strings"
"time"

"periph.io/x/conn/driver/driverreg"
"periph.io/x/conn/gpio"
"periph.io/x/conn/gpio/gpioreg"
"periph.io/x/conn/gpio/gpiostream"
"periph.io/x/conn/physic"
"periph.io/x/conn/pin"
"periph.io/x/host/distro"
"periph.io/x/host/pmem"
"periph.io/x/host/sysfs"
"periph.io/x/host/videocore"
"periph.io/x/conn/v3/driver/driverreg"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpioreg"
"periph.io/x/conn/v3/gpio/gpiostream"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/pin"
"periph.io/x/host/v3/distro"
"periph.io/x/host/v3/pmem"
"periph.io/x/host/v3/sysfs"
"periph.io/x/host/v3/videocore"
)

// All the pins supported by the CPU.
Expand Down
18 changes: 9 additions & 9 deletions bcm283x/gpio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (
"reflect"
"testing"

"periph.io/x/conn/gpio"
"periph.io/x/conn/gpio/gpiostream"
"periph.io/x/conn/i2c"
"periph.io/x/conn/physic"
"periph.io/x/conn/pin"
"periph.io/x/conn/spi"
"periph.io/x/conn/uart"
"periph.io/x/host/pmem"
"periph.io/x/host/videocore"
"periph.io/x/conn/v3/gpio"
"periph.io/x/conn/v3/gpio/gpiostream"
"periph.io/x/conn/v3/i2c"
"periph.io/x/conn/v3/physic"
"periph.io/x/conn/v3/pin"
"periph.io/x/conn/v3/spi"
"periph.io/x/conn/v3/uart"
"periph.io/x/host/v3/pmem"
"periph.io/x/host/v3/videocore"
)

func TestPresent(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion bcm283x/pcm.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"fmt"
"time"

"periph.io/x/conn/physic"
"periph.io/x/conn/v3/physic"
)

type pcmCS uint32
Expand Down
2 changes: 1 addition & 1 deletion bcm283x/pwm.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"time"

"periph.io/x/conn/physic"
"periph.io/x/conn/v3/physic"
)

// PWENi is used to enable/disable the corresponding channel. Setting this bit
Expand Down
Loading

0 comments on commit 17c4f52

Please sign in to comment.