Commit Graph

392 Commits (8a85f99127a72c50f67b85ea60bd5363e7324838)
 

Author SHA1 Message Date
M-A 6620acdaca spi: Rewrite similar to how i2c was refactored (#120)
Because of the way the SPI bus is exposed via sysfs, do not use the same pattern
as i2c. This may change as more OSes are supported.

Increase test coverage for spi and spitest to 100%.
9 years ago
Marc-Antoine Ruel 7464232a5f Remove io.Writer from spi.Conn
This was interface creep
9 years ago
M-A f14be69810 i2c: convert from "number only" to named buses plus aliases (#119)
This is a breaking change.

This is closer to how gpio behaves yet different in practice because of the
different challenges.

spi will be updated later to behave the same. Add support for aliases, which is
very useful, and it permits the CLI tools to accept a free form string to
specify the bus name.

- Increase test coverage of i2c and i2ctest to 100%.
- Add i2c.Pins implementation to i2ctest.Playback.
9 years ago
Marc-Antoine Ruel d7c75db11b Add CONTRIBUTING.md so there's a banner on the PR.
It just points to https://periph.io/project/contributing/
9 years ago
M-A c15fd0bfa5 Add conn.Conn.Duplex() (#118)
Now each connection can report if the underlying communication channel is
half-duplex or full-duplex.

This information is leveraged by some clients, like memory mapped registers
helper struct, to change their behavior or deny use on certain kind of
communication channel.
9 years ago
M-A 56aad834ae Promote onewire, ds18b20 and ds248x to stable. (#117)
It works and it is tested.
9 years ago
Marc-Antoine Ruel 0c585b510a travis: Expose test failure, install missing packages
Add badges.
9 years ago
Marc-Antoine Ruel f1d8127e0b Rename sample to example.
See 96b661173e
9 years ago
Marc-Antoine Ruel 39aa0b9373 Update links without /doc/
See cdf3755696
9 years ago
Marc-Antoine Ruel c9298db3b0 Fix issues found by misspell, gofmt -s -w, golint and go vet; add badges
- There were several typos
- Simplified a few simplified statements
- Added doc for a few exported symbols
- Fix incorrect printf usage
9 years ago
Marc-Antoine Ruel 9031234a9b Fix actual link to SAMPLES 9 years ago
Marc-Antoine Ruel 82983adf33 Deep link to samples 9 years ago
Marc-Antoine Ruel a44f3ac129 Tidy up the docs. 9 years ago
Marc-Antoine Ruel 61b5ae730a Migrated documentation to github.com/periph/website 9 years ago
M-A aa4d58cb95 Fix paths and rename all markdown files to README.md (#112)
This simplify the parsing by hugo.

Replace all '*' by '-' because my editor hates stars as list and it's a bad
idea after all.
9 years ago
M-A b52a4b9f1d Make markdown files more compatible (#111)
Certain parser requires empty line above the first list item to be recognized as
a list.

Update gohci URL.
9 years ago
M-A bbcd750d5b 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.
9 years ago
Thorsten von Eicken adc0251b5a fix ssd1306 i2c commands (#107)
* fix ssd1306 i2c commands
* verified that scrolling works
* added comment that ssd1306 doesn't support SPI yet
9 years ago
Thorsten von Eicken a76f663ae2 Add onewire smoke test (#104)
* set SPI speed and mode in spi smoketest
* add one-wire smoke test
10 years ago
M-A 2d5524c4cb gpio: Rename Edge constants. (#103)
This is to make the value more readable at the call site.
10 years ago
M-A 3368c35ef7 gpio: Rename Up and Down to PullUp and PullDown. (#93)
This should make it more approachable for first time users.
10 years ago
M-A 77cb166f25 Fix the front page sample to be less cryptic. (#92)
The example made it look like the user had to use global variables, which may
cause a poor first time impression. Make it clear that there is multiple ways to
access a pin.
10 years ago
M-A b9bc3713f7 Improve documentation. (#90)
Add "Features"
Drastically shorten the sample on the home page.
10 years ago
M-A 0075d9e849 Increase polish. (#75)
- Make error more consistent and more helpful. Not all errors are wrapped yet
  but a fair part is now.
- Remove the 'first' pattern in i2c, spi, uart and make it work.
- Add allwinner.Pin.wrap() for coherence with PinPL and bcm283x.Pin.
- headers.All() return a copy.
10 years ago
M-A 5cddc1641d host: migrate functions to subpackage cpu. (#63)
Otherwise this would cause some drivers to import host, which would import
drivers that the user may not desire.

This commit fixes this import loop.
10 years ago
M-A f7261fe4df doc: add more information about testing. (#69) 10 years ago
Marc-Antoine Ruel 8a8a4edc01 apa102: fix unit tests.
Changing the temperature calculation from float64 to lookup tables causes small
(<3 in value) changes in the recorded data.
10 years ago
M-A 8925bb0af7 apa102: remove remaining float64 use and dependency on maruel/temperature. (#67)
temperature.ToRGB() was implemented in floating point. OMG.

Fixes #22
10 years ago
Thorsten von Eicken 3bb6afb0ac Add support for DS248x i2c to onewire interface chip, and DS18B20 temp sensors (#59) 10 years ago
M-A 495d261bae periph: Remove Type; gpio: improve pin registering (#48)
periph:
- Type was an approximation to enforce priority ordering. Remove the need for
  approximate ordering by improving gpio instead to support out-of-order pin
  registration. This has the side effect of increasing parallelism. This saved
  ~5ms on "gpio-list" runtime (out of 30ms) when run on a Raspberry Pi 3.

gpio:
- Redo RegisterAlias() to support out of order registration.
- Replace Functional() with Aliases(), which is much more generic.
- Unexport PinAlias, it is not necessary anymore.
- Improve error messages by wrapping the error, it helps legibility in case of
  errors.
- Remove Unregister(), it will be added back when there's an actual call site.
- Remove the (%d) number on sysfs-gpio and bcm283x since it wasn't useful.
- sysfs-gpio: Fix edge when switching output.
- consistently fix accumulated edged when calling sysfs.Pin.In().

lirc:
- Stop mapping IR_IN and IR_OUT when the pin is not mapped.

periph-smoketest:
- Fix to use host.Init(), otherwise drivers weren't correctly loaded.

Fixes #45
(I think)
10 years ago
M-A 508e7b6b50 Improve error messages. (#46) 10 years ago
M-A 01b45ab697 Add more examples, trim documentation. (#44) 10 years ago
M-A 8bca85318d conn: Simplify Conn, rename i2c.Conn to i2c.Bus. (#40)
- Remove fmt.Stringer and io.Writer from conn.Conn. This makes it compatible
  with exp/io.
- Rename i2c.Conn to i2c.Bus since this was confusion. This clarifies the
  distinction between a point-to-point connection and a bus.
- Add these to bus specific interfaces, i2c.Bus, spi.Conn, uart.Conn.

Fixes #15.
10 years ago
Thorsten von Eicken b939aeacd3 fix Celcius, fixes #34 (#35)
* fix Celcius, fixes #34

* remove stale Celsius todo
10 years ago
M-A ae8f618573 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.
10 years ago
M-A 5fce5c83f9 Rename lock to mu. (#16)
Rename lock to mu everywhere.
10 years ago
Thorsten von Eicken aa5269b72f fix some documentation text (#19) 10 years ago
M-A 1dea5dac5c doc: add code style, note about lack of affiliation with Go. (#10)
Fixes #7
10 years ago
quinte17 42624e257c make the i2c address of bme280 configurable (#5)
make the i2c address of bme280 configurable

The address can either be 0x76 or 0x77. It depends on hardware configuration.
If you connect SDO to GND its 0x76
If you connect SDO to V(DDIO) its 0x77.

* Add me to the authors.
* the bme280 cmd uses the new address option
* initialize default addr on definition
10 years ago
Thorsten von Eicken 3392d730dc add distro functions to read device tree model and compatible files (#6) 10 years ago
M-A 6c4287b4da Change copyright from Google Inc to The PIO Authors. (#3)
The PIO Authors is a superset of Google Inc. It includes Google and any
additional contributors that are listed in AUTHORS.
10 years ago
Marc-Antoine Ruel eb384b9d0c Initial commit of pio.
This was extracted from github.com/maruel/dlibox/go/pio @ f51102b.
This code was written by Marc-Antoine Ruel.
10 years ago