From 53f70963d58244869a79503fbc0208a888e5405a Mon Sep 17 00:00:00 2001 From: nullsumme Date: Wed, 13 Jan 2021 07:53:14 +0000 Subject: [PATCH] fixed pull request feedback; renamed to have a consintent naming --- {waveshare213v2 => waveshare2in13v2}/doc.go | 8 +++----- {waveshare213v2 => waveshare2in13v2}/waveshare213v2.go | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) rename {waveshare213v2 => waveshare2in13v2}/doc.go (79%) rename {waveshare213v2 => waveshare2in13v2}/waveshare213v2.go (97%) diff --git a/waveshare213v2/doc.go b/waveshare2in13v2/doc.go similarity index 79% rename from waveshare213v2/doc.go rename to waveshare2in13v2/doc.go index 36ec8b3..265bb6a 100644 --- a/waveshare213v2/doc.go +++ b/waveshare2in13v2/doc.go @@ -2,9 +2,7 @@ // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. -// Package epd controls Waveshare e-paper series displays. -// -// More details +// Package waveshare2in13v2 controls Waveshare 2in13v2 e-paper display. // // Datasheets // @@ -13,5 +11,5 @@ // Product page: // // 2.13 Inch version 2: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT - -package waveshare213v2 +// +package waveshare2in13v2 diff --git a/waveshare213v2/waveshare213v2.go b/waveshare2in13v2/waveshare213v2.go similarity index 97% rename from waveshare213v2/waveshare213v2.go rename to waveshare2in13v2/waveshare213v2.go index 5cb539a..971c045 100644 --- a/waveshare213v2/waveshare213v2.go +++ b/waveshare2in13v2/waveshare213v2.go @@ -1,4 +1,4 @@ -package waveshare213v2 +package waveshare2in13v2 import ( "fmt" @@ -17,7 +17,7 @@ import ( "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 { c conn.Conn @@ -166,7 +166,7 @@ func NewHat(p spi.Port, opts *Opts) (*Dev, error) { 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 { eh := errorHandler{d: *d} @@ -391,12 +391,12 @@ func (d *Dev) DrawPartial(dstRect image.Rectangle, src image.Image, srcPts image return d.turnOnDisplay() } -// Halt clears the display +// Halt clears the display. func (d *Dev) Halt() error { return d.Clear(0xFF) } -// String returns a string containing configuration information +// String returns a string containing configuration information. 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)) }