Rename pio to periph. (#27)

Ran:
    git sed 's/pio/periph/g
    git sed 's/gperiph/gpio/g'
    git sed 's/Gperiph/Gpio/g'
    git sed 's/PIO/Periph/g'
    git sed 's/GPeriph/GPIO/g'
    git mv pio.go periph.go
    git mv pio_test.go periph_test.go
    cd cmd
    git mv pio-info periph-info
    git mv pio-setup periph-setup

where 'git sed' is an alias to run sed over all files in git ls-files.

Fixes #11.
pull/1/head
M-A 10 years ago committed by Thorsten von Eicken
parent 5fce5c83f9
commit ae8f618573

@ -1,4 +1,4 @@
# This is the list of The PIO Authors for copyright purposes.
# This is the list of The Periph Authors for copyright purposes.
#
# This does not necessarily list everyone who has contributed code, since in
# some cases, their employer may be the copyright holder. To see the full list

@ -1,5 +1,5 @@
# This is the official list of people who can contribute
# (and typically have contributed) code to the pio repository.
# (and typically have contributed) code to the periph repository.
# The AUTHORS file lists the copyright holders; this file
# lists people. For example, Google employees are listed here
# but not in AUTHORS, because Google holds the copyright.

@ -1,27 +1,27 @@
# pio - Peripherals I/O in Go
# periph - Peripherals I/O in Go
* [doc/users/](doc/users/) for ready-to-use tools.
* [doc/apps/](doc/apps/) to use `pio` as a library. The complete API
* [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/pio?status.svg)](https://godoc.org/github.com/google/pio).
[![GoDoc](https://godoc.org/github.com/google/periph?status.svg)](https://godoc.org/github.com/google/periph).
* [doc/drivers/](doc/drivers/) to expand the list of supported hardware.
## Users
pio includes [many ready-to-use tools](cmd/)! See [doc/users/](doc/users/) for
periph includes [many ready-to-use tools](cmd/)! See [doc/users/](doc/users/) for
more info on configuring the host and using the included tools.
```bash
go get github.com/google/pio/cmd/...
pio-info
go get github.com/google/periph/cmd/...
periph-info
headers-list
```
## Application developers
For [application developers](doc/apps/), `pio` provides OS-independent bus
For [application developers](doc/apps/), `periph` provides OS-independent bus
interfacing. The following gets the current temperature, barometric pressure and
relative humidity using a bme280:
@ -32,9 +32,9 @@ import (
"fmt"
"log"
"github.com/google/pio/devices"
"github.com/google/pio/devices/bme280"
"github.com/google/pio/host"
"github.com/google/periph/devices"
"github.com/google/periph/devices/bme280"
"github.com/google/periph/host"
)
func main() {
@ -72,10 +72,11 @@ See more examples at [doc/apps/SAMPLES.md](doc/apps/SAMPLES.md)!
## Contributions
`pio` provides an extensible driver registry and common bus interfaces which are
explained in more details at [doc/drivers/](doc/drivers/). `pio` is designed to
work well with drivers living in external repositories so you are not _required_
to fork the pio repository to load out-of-tree drivers for your platform.
`periph` provides an extensible driver registry and common bus interfaces which
are explained in more details at [doc/drivers/](doc/drivers/). `periph` is
designed to work well with drivers living in external repositories so you are
not _required_ to fork the periph repository to load out-of-tree drivers for
your platform.
We gladly accept contributions from device driver developers via GitHub pull
requests, as long as the author has signed the Google Contributor License.
@ -95,15 +96,15 @@ details.
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/pio/host/rpi#pkg-variables),
[bcm283x.GPIO2](https://godoc.org/github.com/google/pio/host/bcm283x#Pin)
[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)
or
[bcm283x.I2C1_SDA](https://godoc.org/github.com/google/pio/host/bcm283x#pkg-variables)
[bcm283x.I2C1_SDA](https://godoc.org/github.com/google/periph/host/bcm283x#pkg-variables)
to refer to the exact same pin when I²C bus #1 is enabled 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/pio/devices/apa102#Dev)
[apa102.Dev](https://godoc.org/github.com/google/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
@ -114,15 +115,15 @@ details.
"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/pio#Register).
registry](https://godoc.org/github.com/google/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/pio/host/allwinner)
[allwinner](https://godoc.org/github.com/google/periph/host/allwinner)
and
[bcm283x](https://godoc.org/github.com/google/pio/host/bcm283x)
[bcm283x](https://godoc.org/github.com/google/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.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -9,8 +9,8 @@ import (
"image"
"image/color"
"github.com/google/pio/conn/spi"
"github.com/google/pio/devices"
"github.com/google/periph/conn/spi"
"github.com/google/periph/devices"
"github.com/maruel/temperature"
)

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -13,8 +13,8 @@ import (
"log"
"testing"
"github.com/google/pio/conn/spi"
"github.com/google/pio/conn/spi/spitest"
"github.com/google/periph/conn/spi"
"github.com/google/periph/conn/spi/spitest"
)
func TestRamp(t *testing.T) {

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -12,10 +12,10 @@ package bme280
import (
"errors"
"github.com/google/pio/conn"
"github.com/google/pio/conn/i2c"
"github.com/google/pio/conn/spi"
"github.com/google/pio/devices"
"github.com/google/periph/conn"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/spi"
"github.com/google/periph/devices"
)
// Oversampling affects how much time is taken to measure each of temperature,

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -9,9 +9,9 @@ import (
"log"
"testing"
"github.com/google/pio/conn/i2c"
"github.com/google/pio/conn/i2c/i2ctest"
"github.com/google/pio/devices"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/i2c/i2ctest"
"github.com/google/periph/devices"
)
// Real data extracted from a device.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -10,7 +10,7 @@ import (
"image/color"
"image/draw"
"github.com/google/pio/devices"
"github.com/google/periph/devices"
)
// Display is a fake devices.Display.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -43,6 +43,6 @@
//
// Raspbian
//
// Please see documentation of package pio/host/rpi for details on how to set
// Please see documentation of package periph/host/rpi for details on how to set
// it up.
package lirc

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -14,9 +14,9 @@ import (
"strings"
"sync"
"github.com/google/pio"
"github.com/google/pio/conn/gpio"
"github.com/google/pio/conn/ir"
"github.com/google/periph"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/ir"
)
// Conn is an open port to lirc.
@ -207,7 +207,7 @@ func read(r *bufio.Reader) (string, error) {
return string(raw), nil
}
// driver implements pio.Driver.
// driver implements periph.Driver.
type driver struct {
}
@ -215,9 +215,9 @@ func (d *driver) String() string {
return "lirc"
}
func (d *driver) Type() pio.Type {
func (d *driver) Type() periph.Type {
// Return the lowest priority, which is Functional.
return pio.Functional
return periph.Functional
}
func (d *driver) Init() (bool, error) {

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -25,10 +25,10 @@ import (
"io"
"log"
"github.com/google/pio/conn/i2c"
"github.com/google/pio/conn/spi"
"github.com/google/pio/devices"
"github.com/google/pio/devices/ssd1306/image1bit"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/spi"
"github.com/google/periph/devices"
"github.com/google/periph/devices/ssd1306/image1bit"
)
// FrameRate determines scrolling speed.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -14,9 +14,9 @@ import (
"golang.org/x/image/font/basicfont"
"golang.org/x/image/math/fixed"
"github.com/google/pio/conn/i2c"
"github.com/google/pio/conn/i2c/i2ctest"
"github.com/google/pio/devices/ssd1306/image1bit"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/conn/i2c/i2ctest"
"github.com/google/periph/devices/ssd1306/image1bit"
)
func TestDrawGray(t *testing.T) {
@ -99,7 +99,7 @@ func Example() {
Face: f,
Dot: fixed.P(0, img.Bounds().Dy()-1-f.Descent),
}
drawer.DrawString("Hello from pio!")
drawer.DrawString("Hello from periph!")
dev.Draw(dev.Bounds(), img, image.Point{})
}

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -14,8 +14,8 @@ import (
"runtime"
"time"
"github.com/google/pio/conn/gpio"
"github.com/google/pio/host"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/host"
)
// Clock converts time to a slice of bytes as segments.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -8,9 +8,9 @@ import (
"log"
"testing"
"github.com/google/pio/conn/gpio"
"github.com/google/pio/conn/gpio/gpiotest"
"github.com/google/pio/host"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/gpio/gpiotest"
"github.com/google/periph/host"
)
func TestNew(t *testing.T) {
@ -28,7 +28,7 @@ func TestNew(t *testing.T) {
func Example() {
if _, err := host.Init(); err != nil {
log.Fatalf("failed to initialize pio: %v", err)
log.Fatalf("failed to initialize periph: %v", err)
}
dev, err := New(gpio.ByNumber(6), gpio.ByNumber(12))
if err != nil {

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -15,9 +15,9 @@ import (
"sync"
"time"
"github.com/google/pio/conn/gpio"
"github.com/google/pio/conn/i2c"
"github.com/google/pio/host"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/i2c"
"github.com/google/periph/host"
)
// Use SkipAddr to skip the address from being sent.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -17,9 +17,9 @@ import (
"sync"
"time"
"github.com/google/pio/conn/gpio"
"github.com/google/pio/conn/spi"
"github.com/google/pio/host"
"github.com/google/periph/conn/gpio"
"github.com/google/periph/conn/spi"
"github.com/google/periph/host"
)
// SPI represents a SPI master implemented as bit-banging on 3 or 4 GPIO pins.

@ -1,4 +1,4 @@
// Copyright 2016 The PIO Authors. All rights reserved.
// Copyright 2016 The Periph Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
@ -21,7 +21,7 @@ import (
"io"
"os"
"github.com/google/pio/conn/gpio"
"github.com/google/periph/conn/gpio"
)
// SetPWM enables and sets the PWM duty on a GPIO output pin via piblaster.

Loading…
Cancel
Save