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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -21,7 +21,7 @@ import (
"io" "io"
"os" "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. // SetPWM enables and sets the PWM duty on a GPIO output pin via piblaster.

Loading…
Cancel
Save