Replace github.com/google with periph.io/x (#110)

This makes periph.io/x/periph as the repository root so it is not tied to the
Google organisation anymore.
pull/1/head
M-A 9 years ago committed by GitHub
parent adc0251b5a
commit bbcd750d5b

@ -16,7 +16,7 @@
* [doc/users/](doc/users/) for ready-to-use tools.
* [doc/apps/](doc/apps/) to use `periph` as a library. The complete API
documentation, including examples, is at
[![GoDoc](https://godoc.org/github.com/google/periph?status.svg)](https://godoc.org/github.com/google/periph).
[![GoDoc](https://godoc.org/periph.io/x/periph?status.svg)](https://godoc.org/periph.io/x/periph).
* [doc/drivers/](doc/drivers/) to expand the list of supported hardware.
@ -27,7 +27,7 @@ for more info on configuring the host and using the included tools.
```bash
# Retrieve and install all the commands at once:
go get github.com/google/periph/cmd/...
go get periph.io/x/periph/cmd/...
# List the host drivers registered and/or initialized:
periph-info
# List the known headers:
@ -49,8 +49,8 @@ package main
import (
"time"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/host"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/host"
)
func main() {
@ -64,11 +64,11 @@ func main() {
The following are synonyms, use the form you prefer:
* Runtime discovery:
* [`gpio.ByNumber(13)`](https://godoc.org/github.com/google/periph/conn/gpio/#ByNumber) or [`gpio.ByName("13")`](https://godoc.org/github.com/google/periph/conn/gpio/#ByName)
* [`gpio.ByName("GPIO13")`](https://godoc.org/github.com/google/periph/conn/gpio/#ByName)
* [`gpio.ByNumber(13)`](https://godoc.org/periph.io/x/periph/conn/gpio/#ByNumber) or [`gpio.ByName("13")`](https://godoc.org/periph.io/x/periph/conn/gpio/#ByName)
* [`gpio.ByName("GPIO13")`](https://godoc.org/periph.io/x/periph/conn/gpio/#ByName)
* Using global variables:
* [`rpi.P1_33`](https://godoc.org/github.com/google/periph/host/rpi#/P1_33) to select the pin via its position on the board
* [`bcm283x.GPIO13`](https://godoc.org/github.com/google/periph/host/bcm283x/#GPIO13)
* [`rpi.P1_33`](https://godoc.org/periph.io/x/periph/host/rpi#/P1_33) to select the pin via its position on the board
* [`bcm283x.GPIO13`](https://godoc.org/periph.io/x/periph/host/bcm283x/#GPIO13)
This example uses basically no CPU: the `Out()` call doesn't call into the
kernel. Instead it directly changes the GPIO memory mapped register.
@ -108,12 +108,12 @@ Google Contributor License. Please see
on each platform.
3. ... yet doesn't get in the way of platform specific code.
* e.g. A user can use statically typed global variables
[rpi.P1_3](https://godoc.org/github.com/google/periph/host/rpi#pkg-variables),
[bcm283x.GPIO2](https://godoc.org/github.com/google/periph/host/bcm283x#Pin)
[rpi.P1_3](https://godoc.org/periph.io/x/periph/host/rpi#pkg-variables),
[bcm283x.GPIO2](https://godoc.org/periph.io/x/periph/host/bcm283x#Pin)
to refer to the exact same pin on a Raspberry Pi.
3. The user can chose to optimize for performance instead of usability.
* e.g.
[apa102.Dev](https://godoc.org/github.com/google/periph/devices/apa102#Dev)
[apa102.Dev](https://godoc.org/periph.io/x/periph/devices/apa102#Dev)
exposes both high level
[draw.Image](https://golang.org/pkg/image/draw/#Image) to draw an image and
low level [io.Writer](https://golang.org/pkg/io/#Writer) to write raw RGB
@ -124,15 +124,15 @@ Google Contributor License. Please see
"component": one for the CPU, one for the board headers, one for each
bus and sensor, etc.
5. Extensible via a [driver
registry](https://godoc.org/github.com/google/periph#Register).
registry](https://godoc.org/periph.io/x/periph#Register).
* e.g. a user can inject a custom driver to expose more pins, headers, etc.
A USB device (like an FT232H) can expose headers _in addition_ to the
headers found on the host.
6. The drivers must use the fastest possible implementation.
* e.g. both
[allwinner](https://godoc.org/github.com/google/periph/host/allwinner)
[allwinner](https://godoc.org/periph.io/x/periph/host/allwinner)
and
[bcm283x](https://godoc.org/github.com/google/periph/host/bcm283x)
[bcm283x](https://godoc.org/periph.io/x/periph/host/bcm283x)
leverage sysfs gpio to expose interrupt driven edge detection, yet use
memory mapped GPIO registers to perform single-cycle reads and writes.

@ -9,8 +9,8 @@ import (
"image"
"image/color"
"github.com/google/periph/conn/spi"
"github.com/google/periph/devices"
"periph.io/x/periph/conn/spi"
"periph.io/x/periph/devices"
)
// maxOut is the maximum intensity of each channel on a APA102 LED.

@ -13,8 +13,8 @@ import (
"log"
"testing"
"github.com/google/periph/conn/spi"
"github.com/google/periph/conn/spi/spitest"
"periph.io/x/periph/conn/spi"
"periph.io/x/periph/conn/spi/spitest"
)
func TestRamp(t *testing.T) {

@ -12,10 +12,10 @@ package bme280
import (
"errors"
"github.com/google/periph/conn"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/spi"
"github.com/google/periph/devices"
"periph.io/x/periph/conn"
"periph.io/x/periph/conn/i2c"
"periph.io/x/periph/conn/spi"
"periph.io/x/periph/devices"
)
// Oversampling affects how much time is taken to measure each of temperature,

@ -9,9 +9,9 @@ import (
"log"
"testing"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/i2c/i2ctest"
"github.com/google/periph/devices"
"periph.io/x/periph/conn/i2c"
"periph.io/x/periph/conn/i2c/i2ctest"
"periph.io/x/periph/devices"
)
// Real data extracted from a device.

@ -10,7 +10,7 @@ import (
"image/color"
"image/draw"
"github.com/google/periph/devices"
"periph.io/x/periph/devices"
)
// Display is a fake devices.Display.

@ -14,8 +14,8 @@ import (
"strings"
"sync"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/ir"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/ir"
)
// Conn is an open port to lirc.

@ -41,10 +41,10 @@ import (
"io"
"log"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/spi"
"github.com/google/periph/devices"
"github.com/google/periph/devices/ssd1306/image1bit"
"periph.io/x/periph/conn/i2c"
"periph.io/x/periph/conn/spi"
"periph.io/x/periph/devices"
"periph.io/x/periph/devices/ssd1306/image1bit"
)
// FrameRate determines scrolling speed.

@ -14,9 +14,9 @@ import (
"golang.org/x/image/font/basicfont"
"golang.org/x/image/math/fixed"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/i2c/i2ctest"
"github.com/google/periph/devices/ssd1306/image1bit"
"periph.io/x/periph/conn/i2c"
"periph.io/x/periph/conn/i2c/i2ctest"
"periph.io/x/periph/devices/ssd1306/image1bit"
)
func TestDrawGray(t *testing.T) {

@ -14,8 +14,8 @@ import (
"runtime"
"time"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/host/cpu"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/host/cpu"
)
// Clock converts time to a slice of bytes as segments.

@ -8,9 +8,9 @@ import (
"log"
"testing"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/gpio/gpiotest"
"github.com/google/periph/host"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/gpio/gpiotest"
"periph.io/x/periph/host"
)
func TestNew(t *testing.T) {

@ -15,9 +15,9 @@ import (
"sync"
"time"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/host/cpu"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/i2c"
"periph.io/x/periph/host/cpu"
)
// Use SkipAddr to skip the address from being sent.

@ -17,9 +17,9 @@ import (
"sync"
"time"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/spi"
"github.com/google/periph/host/cpu"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/spi"
"periph.io/x/periph/host/cpu"
)
// SPI represents a SPI master implemented as bit-banging on 3 or 4 GPIO pins.

@ -25,8 +25,8 @@ import (
"errors"
"time"
"github.com/google/periph/devices"
"github.com/google/periph/experimental/conn/onewire"
"periph.io/x/periph/devices"
"periph.io/x/periph/experimental/conn/onewire"
)
// New returns an object that communicates over 1-wire to the DS18B20 sensor with the

@ -9,10 +9,10 @@ import (
"testing"
"time"
"github.com/google/periph/devices"
"github.com/google/periph/experimental/conn/onewire"
"github.com/google/periph/experimental/conn/onewire/onewiretest"
"github.com/google/periph/host"
"periph.io/x/periph/devices"
"periph.io/x/periph/experimental/conn/onewire"
"periph.io/x/periph/experimental/conn/onewire/onewiretest"
"periph.io/x/periph/host"
)
// TestMain lets periph load all drivers and then runs the tests.

@ -9,8 +9,8 @@ import (
"sync"
"time"
"github.com/google/periph/conn"
"github.com/google/periph/experimental/conn/onewire"
"periph.io/x/periph/conn"
"periph.io/x/periph/experimental/conn/onewire"
)
// Dev is a handle to a ds248x device and it implements the onewire.Bus interface.

@ -16,7 +16,7 @@ import (
"fmt"
"time"
"github.com/google/periph/conn/i2c"
"periph.io/x/periph/conn/i2c"
)
// PupOhm controls the strength of the passive pull-up resistor

@ -8,8 +8,8 @@ import (
"fmt"
"testing"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/i2c/i2ctest"
"periph.io/x/periph/conn/i2c"
"periph.io/x/periph/conn/i2c/i2ctest"
)
// TestInit tests the initialization of a ds2483 using a recording.

@ -21,7 +21,7 @@ import (
"io"
"os"
"github.com/google/periph/conn/gpio"
"periph.io/x/periph/conn/gpio"
)
// SetPWM enables and sets the PWM duty on a GPIO output pin via piblaster.

Loading…
Cancel
Save