fixed pull request feedback; renamed to have a consintent naming

pull/2/head
nullsumme 5 years ago
parent c0d69f5bb8
commit 53f70963d5

@ -2,9 +2,7 @@
// Use of this source code is governed under the Apache License, Version 2.0 // Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file. // that can be found in the LICENSE file.
// Package epd controls Waveshare e-paper series displays. // Package waveshare2in13v2 controls Waveshare 2in13v2 e-paper display.
//
// More details
// //
// Datasheets // Datasheets
// //
@ -13,5 +11,5 @@
// Product page: // Product page:
// //
// 2.13 Inch version 2: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT // 2.13 Inch version 2: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT
//
package waveshare213v2 package waveshare2in13v2

@ -1,4 +1,4 @@
package waveshare213v2 package waveshare2in13v2
import ( import (
"fmt" "fmt"
@ -17,7 +17,7 @@ import (
"periph.io/x/host/v3/rpi" "periph.io/x/host/v3/rpi"
) )
// Dev defines the handler which is used to access the display // Dev defines the handler which is used to access the display.
type Dev struct { type Dev struct {
c conn.Conn c conn.Conn
@ -166,7 +166,7 @@ func NewHat(p spi.Port, opts *Opts) (*Dev, error) {
return New(p, dc, cs, rst, busy, opts) return New(p, dc, cs, rst, busy, opts)
} }
//Init will initialize the display with the partial-update or full-update mode. // Init will initialize the display with the partial-update or full-update mode.
func (d *Dev) Init(partialUpdate PartialUpdate) error { func (d *Dev) Init(partialUpdate PartialUpdate) error {
eh := errorHandler{d: *d} eh := errorHandler{d: *d}
@ -391,12 +391,12 @@ func (d *Dev) DrawPartial(dstRect image.Rectangle, src image.Image, srcPts image
return d.turnOnDisplay() return d.turnOnDisplay()
} }
// Halt clears the display // Halt clears the display.
func (d *Dev) Halt() error { func (d *Dev) Halt() error {
return d.Clear(0xFF) return d.Clear(0xFF)
} }
// String returns a string containing configuration information // String returns a string containing configuration information.
func (d *Dev) String() string { func (d *Dev) String() string {
return fmt.Sprintf("epd.Dev{%s, %s, Height: %s, Width: %s}", d.c, d.dc, strconv.Itoa(d.opts.Height), strconv.Itoa(d.opts.Width)) return fmt.Sprintf("epd.Dev{%s, %s, Height: %s, Width: %s}", d.c, d.dc, strconv.Itoa(d.opts.Height), strconv.Itoa(d.opts.Width))
} }
Loading…
Cancel
Save