diff --git a/README.md b/README.md index 07a5062..c8f0895 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Documentation is at https://periph.io +[![GoDoc](https://godoc.org/periph.io/x/periph?status.svg)](https://godoc.org/periph.io/x/periph) +[![Go Report +Card](https://goreportcard.com/badge/periph.io/x/periph)](https://goreportcard.com/report/periph.io/x/periph) + ## Sample diff --git a/devices/bme280/bme280.go b/devices/bme280/bme280.go index 249aa06..4e33782 100644 --- a/devices/bme280/bme280.go +++ b/devices/bme280/bme280.go @@ -306,7 +306,7 @@ func (d *Dev) writeCommands(b []byte) error { // 0xE0 Reset by writing 0xB6 to it // 0xE1..0xF0 Calibration data // 0xF1 -- -// 0xF2 ctrl_hum; ctrl_meas must be writen to after for change to this register to take effect +// 0xF2 ctrl_hum; ctrl_meas must be written to after for change to this register to take effect // 0xF3 status // 0xF4 ctrl_meas // 0xF5 config diff --git a/devices/lirc/lirc.go b/devices/lirc/lirc.go index 5ed02bc..845dd1c 100644 --- a/devices/lirc/lirc.go +++ b/devices/lirc/lirc.go @@ -35,7 +35,7 @@ func New() (*Conn, error) { return nil, err } c := &Conn{w: w, c: make(chan ir.Message), list: map[string][]string{}} - // Inconditionally retrieve the list of all known keys at start. + // Unconditionally retrieve the list of all known keys at start. if _, err := w.Write([]byte("LIST\n")); err != nil { w.Close() return nil, err diff --git a/experimental/devices/bitbang/i2c.go b/experimental/devices/bitbang/i2c.go index b9aa7ea..0e54293 100644 --- a/experimental/devices/bitbang/i2c.go +++ b/experimental/devices/bitbang/i2c.go @@ -20,7 +20,7 @@ import ( "periph.io/x/periph/host/cpu" ) -// Use SkipAddr to skip the address from being sent. +// SkipAddr can be used to skip the address from being sent. const SkipAddr uint16 = 0xFFFF // I2C represents an I²C master implemented as bit-banging on 2 GPIO pins. @@ -53,7 +53,7 @@ func (i *I2C) Tx(addr uint16, w, r []byte) error { if addr != SkipAddr { if addr > 0xFF { // Page 15, section 3.1.11 10-bit addressing - // TOOD(maruel): Implement if desired; prefix 0b11110xx. + // TODO(maruel): Implement if desired; prefix 0b11110xx. return errors.New("bitbang-i2c: invalid address") } // Page 13, section 3.1.10 The slave address and R/W bit diff --git a/experimental/devices/ds248x/dev.go b/experimental/devices/ds248x/dev.go index fe968aa..4201681 100644 --- a/experimental/devices/ds248x/dev.go +++ b/experimental/devices/ds248x/dev.go @@ -72,7 +72,7 @@ func (d *Dev) Tx(w, r []byte, power onewire.Pullup) error { } // Read bytes from one-wire bus. - for i, _ := range r { + for i := range r { if power == onewire.StrongPullup && i == len(r)-1 { // This is the last byte, need to activate strong-pull-up d.i2cTx([]byte{cmdWriteConfig, d.confReg&0xbf | 0x4}, nil) diff --git a/experimental/devices/ds248x/ds248x.go b/experimental/devices/ds248x/ds248x.go index a65ed87..4162878 100644 --- a/experimental/devices/ds248x/ds248x.go +++ b/experimental/devices/ds248x/ds248x.go @@ -24,8 +24,10 @@ import ( type PupOhm uint8 const ( - R500Ω = 4 // 500Ω passive pull-up resistor - R1000Ω = 6 // 1000Ω passive pull-up resistor + // R500Ω passive pull-up resistor. + R500Ω = 4 + // R1000Ω passive pull-up resistor. + R1000Ω = 6 ) // Opts contains options to pass to the constructor.