diff --git a/experimental/devices/ads1x15/ads1x15.go b/experimental/devices/ads1x15/ads1x15.go index 0bb5985..ac7b38f 100644 --- a/experimental/devices/ads1x15/ads1x15.go +++ b/experimental/devices/ads1x15/ads1x15.go @@ -436,7 +436,7 @@ func (p *analogPin) ReadContinuous() <-chan analog.Sample { case <-t.C: value, err := p.Read() if err != nil { - // In continous mode, we'll ignore errors silently. + // In continuous mode, we'll ignore errors silently. continue } reading <- value diff --git a/experimental/devices/ads1x15/example_test.go b/experimental/devices/ads1x15/example_test.go index f03f360..aefc24c 100644 --- a/experimental/devices/ads1x15/example_test.go +++ b/experimental/devices/ads1x15/example_test.go @@ -50,7 +50,7 @@ func Example() { fmt.Println(reading) - // Read values continously from ADC. + // Read values continuously from ADC. fmt.Println("Continuous reading") c := pin.ReadContinuous() diff --git a/experimental/devices/as7262/as7262.go b/experimental/devices/as7262/as7262.go index 09b72a6..cbdafda 100644 --- a/experimental/devices/as7262/as7262.go +++ b/experimental/devices/as7262/as7262.go @@ -116,7 +116,7 @@ func (b Band) String() string { // // Led Drive Current // -// The AS7262 provides a current limated intergated led drive circuit. Valid +// The AS7262 provides a current-limited integrated led drive circuit. Valid // limits for the drive current are 0mA, 12.5mA, 25mA, 50mA and 100mA. If non // valid values are given the next lowest valid value is used. // @@ -415,7 +415,7 @@ const ( // The as7262 registers are implemented as virtual registers pollStatus // provides a way to repeatedly check if there are any pending reads or writes -// in the relevent buffer before a transaction while with a timeout. +// in the relevant buffer before a transaction while with a timeout. // Direction is used to set which buffer is being polled to be ready. func (d *Dev) pollStatus(ctx context.Context, dir direction) error { timeout := time.NewTimer(sensorTimeout) @@ -517,10 +517,10 @@ const ( // Bank 2 consists of data from the G, Y, O, R photodiodes. bank2 mode = 0x04 // AllContinuously gets data from both banks continuously, requires 2x - // the intergration time. + // the integration time. allContinuously mode = 0x08 // AllOneShot gets data from both banks once, and set the data ready bit in - // the status control register when complete requires 2x the intergration + // the status control register when complete requires 2x the integration // time. allOneShot mode = 0x0c ) diff --git a/experimental/devices/as7262/as7262_test.go b/experimental/devices/as7262/as7262_test.go index f0fffdc..f48dbd8 100644 --- a/experimental/devices/as7262/as7262_test.go +++ b/experimental/devices/as7262/as7262_test.go @@ -792,7 +792,7 @@ func TestNew(t *testing.T) { want2 gpio.PinIn wantErr bool }{ - {name: "defautls", + {name: "defaults", opts: DefaultOpts, want1: G1x, want2: nil, diff --git a/experimental/devices/as7262/testdata_test.go b/experimental/devices/as7262/testdata_test.go index 3b7ffd2..8bb9166 100644 --- a/experimental/devices/as7262/testdata_test.go +++ b/experimental/devices/as7262/testdata_test.go @@ -200,7 +200,7 @@ var sensorTestCaseValidRead = []i2ctest.IO{ {Addr: 0x49, W: []byte{statusReg}, R: []byte{0x00}}, } -// Same as sensorTestCaseValidRead but omiting polling for data ready. +// Same as sensorTestCaseValidRead but omitting polling for data ready. var sensorTestCaseInteruptValidRead = []i2ctest.IO{ {Addr: 0x49, W: []byte{statusReg}, R: []byte{0x00}}, {Addr: 0x49, W: []byte{writeReg, 0x85}, R: []byte{}}, diff --git a/experimental/devices/ccs811/ccs811.go b/experimental/devices/ccs811/ccs811.go index 3494b6a..3f5eb07 100644 --- a/experimental/devices/ccs811/ccs811.go +++ b/experimental/devices/ccs811/ccs811.go @@ -240,8 +240,9 @@ func (d *Dev) SetEnvironmentData(temp, humidity float32) error { return nil } -// GetBaseline provides current baseline used by internal measurement alogrithm. -// For better understanding how to use this value, check the SetBaseline and documentation. +// GetBaseline provides current baseline used by internal measurement algorithm. +// For better understanding how to use this value, check the SetBaseline and +// documentation. func (d *Dev) GetBaseline() ([]byte, error) { r := make([]byte, 2) if err := d.c.Tx([]byte{baselineReg}, r); err != nil { @@ -330,7 +331,7 @@ func (d *Dev) Sense(values *SensorValues) error { return d.SensePartial(ReadAll, values) } -// SensePartial provides marginaly more efficient reading from the sensor. +// SensePartial provides marginally more efficient reading from the sensor. // You can specify what subset of data you want through NeededData constants. func (d *Dev) SensePartial(requested NeededData, values *SensorValues) error { read := make([]byte, requested) diff --git a/experimental/devices/mpu9250/mpu9250.go b/experimental/devices/mpu9250/mpu9250.go index 5395d66..abdbc44 100644 --- a/experimental/devices/mpu9250/mpu9250.go +++ b/experimental/devices/mpu9250/mpu9250.go @@ -1428,7 +1428,7 @@ func (m *MPU9250) GetClockSource() (byte, error) { return m.transport.readMaskedReg(reg.MPU9250_PWR_MGMT_1, reg.MPU9250_CLKSEL_MASK) } -// GetDeviceID Returns the devide ID +// GetDeviceID Returns the device ID func (m *MPU9250) GetDeviceID() (byte, error) { return m.transport.readByte(reg.MPU9250_WHO_AM_I) } diff --git a/experimental/devices/mpu9250/reg/reg.go b/experimental/devices/mpu9250/reg/reg.go index 8d52ac8..f4446ef 100644 --- a/experimental/devices/mpu9250/reg/reg.go +++ b/experimental/devices/mpu9250/reg/reg.go @@ -114,9 +114,9 @@ const ( MPU9250_ZA_OFFSET_L = 0x7E //reset values - WHOAMI_RESET_VAL = 0x71 - POWER_MANAGMENT_1_RESET_VAL = 0x01 - DEFAULT_RESET_VALUE = 0x00 + WHOAMI_RESET_VAL = 0x71 + POWER_MANAGEMENT_1_RESET_VAL = 0x01 + DEFAULT_RESET_VALUE = 0x00 WHOAMI_DEFAULT_VAL = 0x68 diff --git a/experimental/devices/pca9548/pca9548_test.go b/experimental/devices/pca9548/pca9548_test.go index f8eaa9a..d10267f 100644 --- a/experimental/devices/pca9548/pca9548_test.go +++ b/experimental/devices/pca9548/pca9548_test.go @@ -116,7 +116,7 @@ func TestRegisterPorts(t *testing.T) { t.Fatalf("failed to create I²C mux: %v", err) } if _, err := mux.RegisterPorts(tt.alias); err == nil { - t.Fatal("expected second registraion to fail", err) + t.Fatal("expected second registration to fail", err) } for i, port := range tt.expect { if err := i2creg.Unregister(port); err != nil { diff --git a/experimental/devices/pca9685/servo.go b/experimental/devices/pca9685/servo.go index 5322a91..73b3410 100644 --- a/experimental/devices/pca9685/servo.go +++ b/experimental/devices/pca9685/servo.go @@ -26,7 +26,7 @@ type Servo struct { maxAngle physic.Angle } -// NewServoGroup returns a servo group connected throught the pca9685 module +// NewServoGroup returns a servo group connected through the pca9685 module // some pwm and angle limits can be set func NewServoGroup(dev *Dev, minPwm, maxPwm gpio.Duty, minAngle, maxAngle physic.Angle) *ServoGroup { return &ServoGroup{ diff --git a/experimental/devices/sn3218/sn3218.go b/experimental/devices/sn3218/sn3218.go index d4db111..b0d1557 100644 --- a/experimental/devices/sn3218/sn3218.go +++ b/experimental/devices/sn3218/sn3218.go @@ -72,7 +72,7 @@ func (d *Dev) Switch(channel int, state bool) error { return d.updateStates() } -// SwitchAll switches all channels accoring to the state (on/off). +// SwitchAll switches all channels according to the state (on/off). func (d *Dev) SwitchAll(state bool) error { for i := 0; i < 18; i++ { d.on[i] = state