mirror of https://github.com/periph/devices
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
When the destination rectangle didn't start at (0,0) or cover the whole display the Dev.Draw function would continue to update the display in full. Obviously that didn't result in a good output. This change updates the drawing logic to only update the affected area (aligned to whole bytes on the horizontal axis) and limits the amount of transferred data to the minimum needed to cover the destination rectangle. The calculation of the various offsets as well as the function sending the image data are written to support unittesting. Signed-off-by: Michael Hanselmann <public@hansmi.ch> |
4 years ago | |
|---|---|---|
| .github | 4 years ago | |
| ads1x15 | 5 years ago | |
| apa102 | 5 years ago | |
| as7262 | 5 years ago | |
| bh1750 | 5 years ago | |
| bitbang | 5 years ago | |
| bmxx80 | 5 years ago | |
| cap1xxx | 5 years ago | |
| ccs811 | 5 years ago | |
| ds18b20 | 5 years ago | |
| ds248x | 5 years ago | |
| ep0099 | 5 years ago | |
| epd | 5 years ago | |
| hd44780 | 5 years ago | |
| ht16k33 | 5 years ago | |
| hx711 | 5 years ago | |
| ina219 | 5 years ago | |
| inky | 5 years ago | |
| lepton | 4 years ago | |
| lirc | 5 years ago | |
| mcp23xxx | 5 years ago | |
| mcp9808 | 5 years ago | |
| mfrc522 | 5 years ago | |
| mpu9250 | 5 years ago | |
| nrzled | 5 years ago | |
| pca9548 | 5 years ago | |
| pca9685 | 5 years ago | |
| piblaster | 5 years ago | |
| rainbowhat | 5 years ago | |
| screen1d | 5 years ago | |
| sn3218 | 5 years ago | |
| ssd1306 | 5 years ago | |
| st7567 | 5 years ago | |
| tlv493d | 5 years ago | |
| tm1637 | 5 years ago | |
| unicornhd | 5 years ago | |
| videosink | 4 years ago | |
| waveshare2in13v2 | 4 years ago | |
| .gohci.yml | 5 years ago | |
| AUTHORS | 8 years ago | |
| CONTRIBUTING.md | 9 years ago | |
| CONTRIBUTORS | 7 years ago | |
| LICENSE | 10 years ago | |
| README.md | 5 years ago | |
| codecov.yml | 5 years ago | |
| doc.go | 5 years ago | |
| go.mod | 4 years ago | |
| go.sum | 4 years ago | |
README.md
periph - Peripherals I/O in Go
Documentation is at https://periph.io
Join us for a chat on gophers.slack.com/messages/periph, get an invite here.
Example
Blink a LED:
package main
import (
"time"
"periph.io/x/conn/v3/gpio"
"periph.io/x/host/v3"
"periph.io/x/host/v3/rpi"
)
func main() {
host.Init()
t := time.NewTicker(500 * time.Millisecond)
for l := gpio.Low; ; l = !l {
rpi.P1_33.Out(l)
<-t.C
}
}
Curious? Look at supported devices for more examples!
Authors
periph was initiated with ❤️️ and passion by Marc-Antoine
Ruel. The full list of contributors is in
AUTHORS and
CONTRIBUTORS.
Disclaimer
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.
This project is not affiliated with the Go project.
