diff --git a/adt7410/adt7410.go b/adt7410/adt7410.go index 814e3a8..d71dca5 100644 --- a/adt7410/adt7410.go +++ b/adt7410/adt7410.go @@ -1,7 +1,6 @@ // Package adt7410 provides a driver for the adt7410 I2C Temperature Sensor. // // Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADT7410.pdf -// package adt7410 // import "tinygo.org/x/drivers/adt7410" import ( diff --git a/adxl345/adxl345.go b/adxl345/adxl345.go index dcef600..1969ba3 100644 --- a/adxl345/adxl345.go +++ b/adxl345/adxl345.go @@ -3,7 +3,6 @@ // Datasheet EN: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf // // Datasheet JP: http://www.analog.com/media/jp/technical-documentation/data-sheets/ADXL345_jp.pdf -// package adxl345 // import "tinygo.org/x/drivers/adxl345" import "tinygo.org/x/drivers" diff --git a/apds9960/apds9960.go b/apds9960/apds9960.go index cd2a21e..ed523ef 100644 --- a/apds9960/apds9960.go +++ b/apds9960/apds9960.go @@ -2,7 +2,6 @@ // a digital proximity, ambient light, RGB and gesture sensor. // // Datasheet: https://cdn.sparkfun.com/assets/learn_tutorials/3/2/1/Avago-APDS-9960-datasheet.pdf -// package apds9960 import ( diff --git a/axp192/axp192.go b/axp192/axp192.go index a9f3d75..9c342d1 100644 --- a/axp192/axp192.go +++ b/axp192/axp192.go @@ -3,7 +3,6 @@ // // http://www.x-powers.com/en.php/Info/product_detail/article_id/29 // Datasheet: https://github.com/m5stack/M5-Schematic/blob/master/Core/AXP192%20Datasheet_v1.1_en_draft_2211.pdf -// package axp192 // import "tinygo.org/x/drivers/axp192" import ( diff --git a/bh1750/bh1750.go b/bh1750/bh1750.go index 6093c34..c1a0a0e 100644 --- a/bh1750/bh1750.go +++ b/bh1750/bh1750.go @@ -2,7 +2,6 @@ // // Datasheet: // https://www.mouser.com/ds/2/348/bh1750fvi-e-186247.pdf -// package bh1750 // import "tinygo.org/x/drivers/bh1750" import ( diff --git a/blinkm/blinkm.go b/blinkm/blinkm.go index 1252a4e..209661f 100644 --- a/blinkm/blinkm.go +++ b/blinkm/blinkm.go @@ -1,7 +1,6 @@ // Package blinkm implements a driver for the BlinkM I2C RGB LED. // // Datasheet: http://thingm.com/fileadmin/thingm/downloads/BlinkM_datasheet.pdf -// package blinkm // import "tinygo.org/x/drivers/blinkm" import "tinygo.org/x/drivers" diff --git a/bme280/bme280.go b/bme280/bme280.go index 3b25032..83f2b4f 100644 --- a/bme280/bme280.go +++ b/bme280/bme280.go @@ -3,7 +3,6 @@ // // Datasheet: // https://cdn-shop.adafruit.com/datasheets/BST-BME280_DS001-10.pdf -// package bme280 import ( @@ -149,7 +148,8 @@ func (d *Device) ReadHumidity() (int32, error) { // ReadAltitude returns the current altitude in meters based on the // current barometric pressure and estimated pressure at sea level. // Calculation is based on code from Adafruit BME280 library -// https://github.com/adafruit/Adafruit_BME280_Library +// +// https://github.com/adafruit/Adafruit_BME280_Library func (d *Device) ReadAltitude() (alt int32, err error) { mPa, _ := d.ReadPressure() atmP := float32(mPa) / 100000 diff --git a/bmp180/bmp180.go b/bmp180/bmp180.go index 984c338..4d48863 100644 --- a/bmp180/bmp180.go +++ b/bmp180/bmp180.go @@ -3,7 +3,6 @@ // // Datasheet: // https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf -// package bmp180 // import "tinygo.org/x/drivers/bmp180" import ( diff --git a/buzzer/buzzer.go b/buzzer/buzzer.go index b294365..00822b7 100644 --- a/buzzer/buzzer.go +++ b/buzzer/buzzer.go @@ -1,5 +1,4 @@ // Package buzzer provides a very simplistic driver for a connected buzzer or low-fidelity speaker. -// package buzzer // import "tinygo.org/x/drivers/buzzer" import ( diff --git a/drivers.go b/drivers.go index a158d9a..5965a21 100644 --- a/drivers.go +++ b/drivers.go @@ -3,22 +3,22 @@ // // Here is an example in TinyGo that uses the BMP180 digital barometer: // -// package main +// package main // -// import ( +// import ( // "time" // "machine" // -// "tinygo.org/x/drivers/bmp180" -// ) +// "tinygo.org/x/drivers/bmp180" +// ) // -// func main() { +// func main() { // machine.I2C0.Configure(machine.I2CConfig{}) // sensor := bmp180.New(machine.I2C0) // sensor.Configure() // -// connected := sensor.Connected() -// if !connected { +// connected := sensor.Connected() +// if !connected { // println("BMP180 not detected") // return // } @@ -38,5 +38,4 @@ // Each individual driver is contained within its own sub-package within this package and // there are no interdependencies in order to minimize the final size of compiled code that // uses any of these drivers. -// package drivers // import "tinygo.org/x/drivers" diff --git a/ds1307/ds1307.go b/ds1307/ds1307.go index 9026d33..1d87819 100644 --- a/ds1307/ds1307.go +++ b/ds1307/ds1307.go @@ -2,7 +2,6 @@ // // Datasheet: // https://datasheets.maximintegrated.com/en/ds/DS1307.pdf -// package ds1307 // import "tinygo.org/x/drivers/ds1307" import ( diff --git a/espat/espat.go b/espat/espat.go index 41a9893..cdb97cc 100644 --- a/espat/espat.go +++ b/espat/espat.go @@ -15,7 +15,6 @@ // // AT command set: // https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf -// package espat // import "tinygo.org/x/drivers/espat" import ( diff --git a/examples/ili9341/initdisplay/atsamd21.go b/examples/ili9341/initdisplay/atsamd21.go index a400788..a46a8dd 100644 --- a/examples/ili9341/initdisplay/atsamd21.go +++ b/examples/ili9341/initdisplay/atsamd21.go @@ -9,8 +9,6 @@ import ( "tinygo.org/x/drivers/ili9341" ) -var () - func InitDisplay() *ili9341.Device { machine.SPI0.Configure(machine.SPIConfig{ SCK: machine.SPI0_SCK_PIN, diff --git a/examples/microphone/main.go b/examples/microphone/main.go index ccb643b..15c4662 100644 --- a/examples/microphone/main.go +++ b/examples/microphone/main.go @@ -2,7 +2,6 @@ // to read data from the onboard MEMS microphone. // // Uses ideas from the https://github.com/adafruit/Adafruit_CircuitPlayground repo. -// package main import ( diff --git a/examples/sx126x/rfswitch/gnse.go b/examples/sx126x/rfswitch/gnse.go index 3530a67..d78863e 100644 --- a/examples/sx126x/rfswitch/gnse.go +++ b/examples/sx126x/rfswitch/gnse.go @@ -2,13 +2,13 @@ // +build gnse /* - Generic Node Sensor Edition - RFSwitch +Generic Node Sensor Edition +RFSwitch - Disable Switch : PB8=OFF PA0=OFF PA1=OFF - Enable RX : PB8=ON PA0=ON PA1=OFF - Enable TX RFO LP : PB8=ON PA0=ON PA1=ON - Enable TX RFO HP : PB8=ON PA0=OFF PA1=ON +Disable Switch : PB8=OFF PA0=OFF PA1=OFF +Enable RX : PB8=ON PA0=ON PA1=OFF +Enable TX RFO LP : PB8=ON PA0=ON PA1=ON +Enable TX RFO HP : PB8=ON PA0=OFF PA1=ON */ package rfswitch diff --git a/examples/sx126x/rfswitch/wl55jc.go b/examples/sx126x/rfswitch/wl55jc.go index 93f2f35..be1ca51 100644 --- a/examples/sx126x/rfswitch/wl55jc.go +++ b/examples/sx126x/rfswitch/wl55jc.go @@ -2,8 +2,8 @@ // +build nucleowl55jc /* - Nucleo WL55JC1 - RFSwitch + Nucleo WL55JC1 + RFSwitch +-----------+---------+------------+------------+ | | FE_CTRL1 | FE_CTRL2 | FE_CTRL3 | diff --git a/ft6336/ft6336.go b/ft6336/ft6336.go index a0662a8..c959d05 100644 --- a/ft6336/ft6336.go +++ b/ft6336/ft6336.go @@ -2,7 +2,6 @@ // panel controller. // // Datasheet: https://focuslcds.com/content/FT6236.pdf -// package ft6336 import ( @@ -42,8 +41,9 @@ func (d *Device) Configure(config Config) error { } // SetGMode sets interrupt mode. -// 0x00 : Interrupt Polling mode -// 0x01 : Interrupt Trigger mode (default) +// +// 0x00 : Interrupt Polling mode +// 0x01 : Interrupt Trigger mode (default) func (d *Device) SetGMode(v uint8) { d.write1Byte(RegGMode, v) } diff --git a/gc9a01/gc9a01.go b/gc9a01/gc9a01.go index 67bc85a..1426241 100644 --- a/gc9a01/gc9a01.go +++ b/gc9a01/gc9a01.go @@ -1,7 +1,6 @@ // Package gc9a01 implements a driver for the gc9a01 LCD round display // // Datasheet: https://www.waveshare.com/w/upload/5/5e/GC9A01A.pdf -// package gc9a01 // import "tinygo.org/x/drivers/gc9a01" import ( diff --git a/hd44780/hd44780.go b/hd44780/hd44780.go index d3145ac..111f70d 100644 --- a/hd44780/hd44780.go +++ b/hd44780/hd44780.go @@ -1,7 +1,6 @@ // Package hd44780 provides a driver for the HD44780 LCD controller. // // Datasheet: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf -// package hd44780 // import "tinygo.org/x/drivers/hd44780" import ( diff --git a/hd44780i2c/hd44780i2c.go b/hd44780i2c/hd44780i2c.go index 90571da..6c11b5a 100644 --- a/hd44780i2c/hd44780i2c.go +++ b/hd44780i2c/hd44780i2c.go @@ -2,7 +2,6 @@ // with an I2C adapter. // // Datasheet: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf -// package hd44780i2c import ( diff --git a/hts221/hts221.go b/hts221/hts221.go index f5d22fb..322947c 100644 --- a/hts221/hts221.go +++ b/hts221/hts221.go @@ -2,7 +2,6 @@ // a capacitive digital sensor for relative humidity and temperature. // // Datasheet: https://www.st.com/resource/en/datasheet/hts221.pdf -// package hts221 import ( @@ -85,7 +84,6 @@ func (d *Device) ReadTemperature() (temperature int32, err error) { // Resolution sets the HTS221's resolution mode. // The higher resolutions are more accurate but comsume more power (see datasheet). // The number of averaged samples will be (h + 2) ^ 2, (t + 1) ^ 2 -// func (d *Device) Resolution(h uint8, t uint8) { if h > 7 { h = 3 // default diff --git a/hub75/hub75.go b/hub75/hub75.go index bb6aa5c..8205a53 100644 --- a/hub75/hub75.go +++ b/hub75/hub75.go @@ -2,7 +2,6 @@ // // Guide: https://cdn-learn.adafruit.com/downloads/pdf/32x16-32x32-rgb-led-matrix.pdf // This driver was inspired by https://github.com/2dom/PxMatrix -// package hub75 // import "tinygo.org/x/drivers/hub75" import ( diff --git a/image/internal/compress/flate/dict_decoder.go b/image/internal/compress/flate/dict_decoder.go index c10ff2c..a6b700f 100644 --- a/image/internal/compress/flate/dict_decoder.go +++ b/image/internal/compress/flate/dict_decoder.go @@ -7,19 +7,19 @@ package flate // dictDecoder implements the LZ77 sliding dictionary as used in decompression. // LZ77 decompresses data through sequences of two forms of commands: // -// * Literal insertions: Runs of one or more symbols are inserted into the data -// stream as is. This is accomplished through the writeByte method for a -// single symbol, or combinations of writeSlice/writeMark for multiple symbols. -// Any valid stream must start with a literal insertion if no preset dictionary -// is used. +// - Literal insertions: Runs of one or more symbols are inserted into the data +// stream as is. This is accomplished through the writeByte method for a +// single symbol, or combinations of writeSlice/writeMark for multiple symbols. +// Any valid stream must start with a literal insertion if no preset dictionary +// is used. // -// * Backward copies: Runs of one or more symbols are copied from previously -// emitted data. Backward copies come as the tuple (dist, length) where dist -// determines how far back in the stream to copy from and length determines how -// many bytes to copy. Note that it is valid for the length to be greater than -// the distance. Since LZ77 uses forward copies, that situation is used to -// perform a form of run-length encoding on repeated runs of symbols. -// The writeCopy and tryWriteCopy are used to implement this command. +// - Backward copies: Runs of one or more symbols are copied from previously +// emitted data. Backward copies come as the tuple (dist, length) where dist +// determines how far back in the stream to copy from and length determines how +// many bytes to copy. Note that it is valid for the length to be greater than +// the distance. Since LZ77 uses forward copies, that situation is used to +// perform a form of run-length encoding on repeated runs of symbols. +// The writeCopy and tryWriteCopy are used to implement this command. // // For performance reasons, this implementation performs little to no sanity // checks about the arguments. As such, the invariants documented for each diff --git a/image/internal/compress/flate/huffman_bit_writer.go b/image/internal/compress/flate/huffman_bit_writer.go index b3ae76d..6a4e48e 100644 --- a/image/internal/compress/flate/huffman_bit_writer.go +++ b/image/internal/compress/flate/huffman_bit_writer.go @@ -194,9 +194,9 @@ func (w *huffmanBitWriter) writeBytes(bytes []byte) { // Codes 0-15 are single byte codes. Codes 16-18 are followed by additional // information. Code badCode is an end marker // -// numLiterals The number of literals in literalEncoding -// numOffsets The number of offsets in offsetEncoding -// litenc, offenc The literal and offset encoder to use +// numLiterals The number of literals in literalEncoding +// numOffsets The number of offsets in offsetEncoding +// litenc, offenc The literal and offset encoder to use func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litEnc, offEnc *huffmanEncoder) { for i := range w.codegenFreq { w.codegenFreq[i] = 0 @@ -353,9 +353,9 @@ func (w *huffmanBitWriter) writeCode(c hcode) { // Write the header of a dynamic Huffman block to the output stream. // -// numLiterals The number of literals specified in codegen -// numOffsets The number of offsets specified in codegen -// numCodegens The number of codegens used in codegen +// numLiterals The number of literals specified in codegen +// numOffsets The number of offsets specified in codegen +// numCodegens The number of codegens used in codegen func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, numCodegens int, isEof bool) { if w.err != nil { return diff --git a/image/internal/compress/flate/huffman_code.go b/image/internal/compress/flate/huffman_code.go index 891537e..89d089e 100644 --- a/image/internal/compress/flate/huffman_code.go +++ b/image/internal/compress/flate/huffman_code.go @@ -124,13 +124,18 @@ const maxBitsLimit = 16 // The cases of 0, 1, and 2 literals are handled by special case code. // // list An array of the literals with non-zero frequencies -// and their associated frequencies. The array is in order of increasing -// frequency, and has as its last element a special element with frequency -// MaxInt32 +// +// and their associated frequencies. The array is in order of increasing +// frequency, and has as its last element a special element with frequency +// MaxInt32 +// // maxBits The maximum number of bits that should be used to encode any literal. -// Must be less than 16. +// +// Must be less than 16. +// // return An integer array in which array[i] indicates the number of literals -// that should be encoded in i bits. +// +// that should be encoded in i bits. func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 { if maxBits >= maxBitsLimit { panic("flate: maxBits too large") diff --git a/image/jpeg/writer.go b/image/jpeg/writer.go index a600499..0027f78 100644 --- a/image/jpeg/writer.go +++ b/image/jpeg/writer.go @@ -481,25 +481,25 @@ func scale(dst *block, src *[4]block) { } // sosHeaderY is the SOS marker "\xff\xda" followed by 8 bytes: -// - the marker length "\x00\x08", -// - the number of components "\x01", -// - component 1 uses DC table 0 and AC table 0 "\x01\x00", -// - the bytes "\x00\x3f\x00". Section B.2.3 of the spec says that for -// sequential DCTs, those bytes (8-bit Ss, 8-bit Se, 4-bit Ah, 4-bit Al) -// should be 0x00, 0x3f, 0x00<<4 | 0x00. +// - the marker length "\x00\x08", +// - the number of components "\x01", +// - component 1 uses DC table 0 and AC table 0 "\x01\x00", +// - the bytes "\x00\x3f\x00". Section B.2.3 of the spec says that for +// sequential DCTs, those bytes (8-bit Ss, 8-bit Se, 4-bit Ah, 4-bit Al) +// should be 0x00, 0x3f, 0x00<<4 | 0x00. var sosHeaderY = []byte{ 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x00, 0x3f, 0x00, } // sosHeaderYCbCr is the SOS marker "\xff\xda" followed by 12 bytes: -// - the marker length "\x00\x0c", -// - the number of components "\x03", -// - component 1 uses DC table 0 and AC table 0 "\x01\x00", -// - component 2 uses DC table 1 and AC table 1 "\x02\x11", -// - component 3 uses DC table 1 and AC table 1 "\x03\x11", -// - the bytes "\x00\x3f\x00". Section B.2.3 of the spec says that for -// sequential DCTs, those bytes (8-bit Ss, 8-bit Se, 4-bit Ah, 4-bit Al) -// should be 0x00, 0x3f, 0x00<<4 | 0x00. +// - the marker length "\x00\x0c", +// - the number of components "\x03", +// - component 1 uses DC table 0 and AC table 0 "\x01\x00", +// - component 2 uses DC table 1 and AC table 1 "\x02\x11", +// - component 3 uses DC table 1 and AC table 1 "\x03\x11", +// - the bytes "\x00\x3f\x00". Section B.2.3 of the spec says that for +// sequential DCTs, those bytes (8-bit Ss, 8-bit Se, 4-bit Ah, 4-bit Al) +// should be 0x00, 0x3f, 0x00<<4 | 0x00. var sosHeaderYCbCr = []byte{ 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3f, 0x00, diff --git a/image/png/reader.go b/image/png/reader.go index 9e7c31d..0c4a725 100644 --- a/image/png/reader.go +++ b/image/png/reader.go @@ -326,7 +326,9 @@ func (d *decoder) parsetRNS(length uint32) error { // Read presents one or more IDAT chunks as one continuous stream (minus the // intermediate chunk headers and footers). If the PNG data looked like: -// ... len0 IDAT xxx crc0 len1 IDAT yy crc1 len2 IEND crc2 +// +// ... len0 IDAT xxx crc0 len1 IDAT yy crc1 len2 IEND crc2 +// // then this reader presents xxxyy. For well-formed PNG data, the decoder state // immediately before the first Read call is that d.r is positioned between the // first IDAT and xxx, and the decoder state immediately after the last Read diff --git a/ina260/ina260.go b/ina260/ina260.go index b9a4518..f6bae44 100644 --- a/ina260/ina260.go +++ b/ina260/ina260.go @@ -43,7 +43,6 @@ func New(bus drivers.I2C) Device { // * VoltConvTime = CONVTIME_1100USEC // * CurrentConvTime = CONVTIME_1100USEC // * Mode = MODE_CONTINUOUS | MODE_VOLTAGE | MODE_CURRENT -// func (d *Device) Configure(cfg Config) { var val uint16 diff --git a/is31fl3731/is31fl3731.go b/is31fl3731/is31fl3731.go index 0d0ad8b..8650073 100644 --- a/is31fl3731/is31fl3731.go +++ b/is31fl3731/is31fl3731.go @@ -7,11 +7,12 @@ // https://www.adafruit.com/product/3163 // // Datasheet: -// https://www.lumissil.com/assets/pdf/core/IS31FL3731_DS.pdf +// +// https://www.lumissil.com/assets/pdf/core/IS31FL3731_DS.pdf // // This driver inspired by Adafruit Python driver: -// https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731 // +// https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731 package is31fl3731 import ( diff --git a/is31fl3731/is31fl3731_acw15x7.go b/is31fl3731/is31fl3731_acw15x7.go index 57d5dfb..6342b69 100644 --- a/is31fl3731/is31fl3731_acw15x7.go +++ b/is31fl3731/is31fl3731_acw15x7.go @@ -16,29 +16,28 @@ type DeviceAdafruitCharlieWing15x7 struct { // enableLEDs enables only LEDs that are soldered on the Adafruit CharlieWing // board. The board has following LEDs matrix layout: // -// "o" - connected (soldered) LEDs -// "x" - not connected LEDs -// -// + - - - - - - - - - - - - - - + -// | + - - - - - - - - - - - - + | -// | | | | -// | | v v -// +---------------------------------+ -// | o o o o o o o o o o o o o o o x | -// | o o o o o o o o o o o o o o o x | -// | o o o o o o o o o o o o o o o x | -// | o o o o o o o o o o o o o o o x | -// | o o o o o o o o o o o o o o o x | -// | o o o o o o o o o o o o o o o x | -// | o o o o o o o o o o o o o o o x | -// | x x x x x x x x x x x x x x x x | -// +---------------------------------+ -// ^ ^ | | -// | | ... - - + | -// | + - - - - - - - - - - - - - + -// | -// start (address 0x00) +// "o" - connected (soldered) LEDs +// "x" - not connected LEDs // +// + - - - - - - - - - - - - - - + +// | + - - - - - - - - - - - - + | +// | | | | +// | | v v +// +---------------------------------+ +// | o o o o o o o o o o o o o o o x | +// | o o o o o o o o o o o o o o o x | +// | o o o o o o o o o o o o o o o x | +// | o o o o o o o o o o o o o o o x | +// | o o o o o o o o o o o o o o o x | +// | o o o o o o o o o o o o o o o x | +// | o o o o o o o o o o o o o o o x | +// | x x x x x x x x x x x x x x x x | +// +---------------------------------+ +// ^ ^ | | +// | | ... - - + | +// | + - - - - - - - - - - - - - + +// | +// start (address 0x00) func (d *DeviceAdafruitCharlieWing15x7) enableLEDs() (err error) { for frame := FRAME_0; frame <= FRAME_7; frame++ { err = d.selectCommand(frame) diff --git a/l293x/l293x.go b/l293x/l293x.go index f9f2c60..a8403b5 100644 --- a/l293x/l293x.go +++ b/l293x/l293x.go @@ -2,7 +2,6 @@ // typically used to control DC motors. // // Datasheet: https://www.ti.com/lit/ds/symlink/l293d.pdf -// package l293x // import "tinygo.org/x/drivers/l293x" import ( diff --git a/l9110x/l9110x.go b/l9110x/l9110x.go index c8f5963..969e1e4 100644 --- a/l9110x/l9110x.go +++ b/l9110x/l9110x.go @@ -2,7 +2,6 @@ // typically used to control DC motors. // // Datasheet: https://www.elecrow.com/download/datasheet-l9110.pdf -// package l9110x // import "tinygo.org/x/drivers/l9110x" import ( diff --git a/lis2mdl/lis2mdl.go b/lis2mdl/lis2mdl.go index c6baeae..437eedb 100644 --- a/lis2mdl/lis2mdl.go +++ b/lis2mdl/lis2mdl.go @@ -2,7 +2,6 @@ // a magnetic sensor which is included on BBC micro:bit v1.5. // // Datasheet: https://www.st.com/resource/en/datasheet/lis2mdl.pdf -// package lis2mdl // import "tinygo.org/x/drivers/lis2mdl" import ( diff --git a/lis3dh/lis3dh.go b/lis3dh/lis3dh.go index c3ec505..0e49f5e 100644 --- a/lis3dh/lis3dh.go +++ b/lis3dh/lis3dh.go @@ -1,7 +1,6 @@ // Package lis3dh provides a driver for the LIS3DH digital accelerometer. // // Datasheet: https://www.st.com/resource/en/datasheet/lis3dh.pdf -// package lis3dh // import "tinygo.org/x/drivers/lis3dh" import "tinygo.org/x/drivers" diff --git a/lps22hb/lps22hb.go b/lps22hb/lps22hb.go index 59af940..4a1b6b4 100644 --- a/lps22hb/lps22hb.go +++ b/lps22hb/lps22hb.go @@ -1,7 +1,6 @@ // Package lps22hb implements a driver for LPS22HB, a MEMS nano pressure sensor. // // Datasheet: https://www.st.com/resource/en/datasheet/dm00140895.pdf -// package lps22hb import ( diff --git a/lsm303agr/lsm303agr.go b/lsm303agr/lsm303agr.go index 2eb4cfb..39bf84f 100644 --- a/lsm303agr/lsm303agr.go +++ b/lsm303agr/lsm303agr.go @@ -2,7 +2,6 @@ // a 3 axis accelerometer/magnetic sensor which is included on BBC micro:bits v1.5. // // Datasheet: https://www.st.com/resource/en/datasheet/lsm303agr.pdf -// package lsm303agr // import "tinygo.org/x/drivers/lsm303agr" import ( diff --git a/lsm6ds3/lsm6ds3.go b/lsm6ds3/lsm6ds3.go index 7db9ee5..29ebd9d 100644 --- a/lsm6ds3/lsm6ds3.go +++ b/lsm6ds3/lsm6ds3.go @@ -2,7 +2,6 @@ // Measurement Unit (IMU) // // Datasheet: https://www.st.com/resource/en/datasheet/lsm6ds3.pdf -// package lsm6ds3 // import "tinygo.org/x/drivers/lsm6ds3" import ( diff --git a/lsm6ds3tr/lsm6ds3tr.go b/lsm6ds3tr/lsm6ds3tr.go index 9683a11..7862e12 100644 --- a/lsm6ds3tr/lsm6ds3tr.go +++ b/lsm6ds3tr/lsm6ds3tr.go @@ -2,7 +2,6 @@ // a 6 axis Inertial Measurement Unit (IMU) // // Datasheet: https://www.st.com/resource/en/datasheet/lsm6ds3tr.pdf -// package lsm6ds3tr // import "tinygo.org/x/drivers/lsm6ds3tr" import ( diff --git a/lsm6dsox/lsm6dsox.go b/lsm6dsox/lsm6dsox.go index 42c5ac1..3748bb9 100644 --- a/lsm6dsox/lsm6dsox.go +++ b/lsm6dsox/lsm6dsox.go @@ -2,7 +2,6 @@ // a 6 axis Inertial Measurement Unit (IMU) // // Datasheet: https://www.st.com/resource/en/datasheet/lsm6dsox.pdf -// package lsm6dsox // import "tinygo.org/x/drivers/lsm6dsox" import ( diff --git a/lsm9ds1/lsm9ds1.go b/lsm9ds1/lsm9ds1.go index bc56bac..74bb05d 100644 --- a/lsm9ds1/lsm9ds1.go +++ b/lsm9ds1/lsm9ds1.go @@ -1,7 +1,6 @@ // LSM9DS1, 9 axis Inertial Measurement Unit (IMU) // // Datasheet: https://www.st.com/resource/en/datasheet/lsm6ds3.pdf -// package lsm9ds1 // import "tinygo.org/x/drivers/lsm9ds1" import ( diff --git a/mag3110/mag3110.go b/mag3110/mag3110.go index 0fe7d67..e1ecdcd 100644 --- a/mag3110/mag3110.go +++ b/mag3110/mag3110.go @@ -2,7 +2,6 @@ // Freescale/NXP. // // Datasheet: https://www.nxp.com/docs/en/data-sheet/MAG3110.pdf -// package mag3110 // import "tinygo.org/x/drivers/mag3110" import "tinygo.org/x/drivers" diff --git a/mcp23017/device.go b/mcp23017/device.go index fb2cbad..998829e 100644 --- a/mcp23017/device.go +++ b/mcp23017/device.go @@ -133,7 +133,7 @@ func (d *Device) GetPins() (Pins, error) { // // That is, it does the equivalent of: // -// for i := 0; i < PinCount; i++ { +// for i := 0; i < PinCount; i++ { // if mask.Get(i) { // d.Pin(i).Set(pins.Get(i)) // } diff --git a/mcp23017/multidevice.go b/mcp23017/multidevice.go index 34db93e..fa13520 100644 --- a/mcp23017/multidevice.go +++ b/mcp23017/multidevice.go @@ -93,7 +93,7 @@ func (devs Devices) GetPins(pins PinSlice) error { // // That is, it does the equivalent of: // -// for i := 0; i < PinCount*len(devs); i++ { +// for i := 0; i < PinCount*len(devs); i++ { // if mask.Get(i) { // d.Pin(i).Set(pins.Get(i)) // } diff --git a/mcp2515/registers.go b/mcp2515/registers.go index 4dbe3ec..6b7f28a 100644 --- a/mcp2515/registers.go +++ b/mcp2515/registers.go @@ -1,7 +1,6 @@ // Package mcp2515 implements a driver for the MCP2515 CAN Controller. // // Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf -// package mcp2515 // import "tinygo.org/x/drivers/mcp2515" const DebugEn = 0 diff --git a/mcp3008/mcp3008.go b/mcp3008/mcp3008.go index bb99ac3..1467a70 100644 --- a/mcp3008/mcp3008.go +++ b/mcp3008/mcp3008.go @@ -1,7 +1,6 @@ // Package mcp3008 implements a driver for the MCP3008 Analog to Digital Converter. // // Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21295d.pdf -// package mcp3008 // import "tinygo.org/x/drivers/mcp3008" import ( diff --git a/microbitmatrix/microbitmatrix-v1.go b/microbitmatrix/microbitmatrix-v1.go index b4af225..7416d64 100644 --- a/microbitmatrix/microbitmatrix-v1.go +++ b/microbitmatrix/microbitmatrix-v1.go @@ -4,7 +4,6 @@ // Package microbitmatrix implements a driver for the BBC micro:bit's LED matrix. // // Schematic: https://github.com/bbcmicrobit/hardware/blob/master/SCH_BBC-Microbit_V1.3B.pdf -// package microbitmatrix // import "tinygo.org/x/drivers/microbitmatrix" import ( diff --git a/microbitmatrix/microbitmatrix-v2.go b/microbitmatrix/microbitmatrix-v2.go index 85ded9e..104612c 100644 --- a/microbitmatrix/microbitmatrix-v2.go +++ b/microbitmatrix/microbitmatrix-v2.go @@ -4,7 +4,6 @@ // Package microbitmatrix implements a driver for the BBC micro:bit version 2 LED matrix. // // Schematic: -// package microbitmatrix // import "tinygo.org/x/drivers/microbitmatrix" import ( diff --git a/microbitmatrix/microbitmatrix.go b/microbitmatrix/microbitmatrix.go index dbf7152..7b23a90 100644 --- a/microbitmatrix/microbitmatrix.go +++ b/microbitmatrix/microbitmatrix.go @@ -1,7 +1,6 @@ // Package microbitmatrix implements a driver for the BBC micro:bit's LED matrix. // // Schematic: https://github.com/bbcmicrobit/hardware/blob/master/SCH_BBC-Microbit_V1.3B.pdf -// package microbitmatrix // import "tinygo.org/x/drivers/microbitmatrix" import ( diff --git a/microphone/microphone.go b/microphone/microphone.go index e6b6e8a..03d82b3 100644 --- a/microphone/microphone.go +++ b/microphone/microphone.go @@ -2,7 +2,6 @@ // For example, the Adafruit PDM MEMS breakout board (https://www.adafruit.com/product/3492) // // Datasheet: https://cdn-learn.adafruit.com/assets/assets/000/049/977/original/MP34DT01-M.pdf -// package microphone // import "tinygo.org/x/drivers/microphone" import ( @@ -141,7 +140,6 @@ func (d *Device) GetSoundPressure() (int32, int32) { // for that sample. // // For more information: https://en.wikipedia.org/wiki/Sinc_filter -// var sincfilter = [quantizeSteps]uint16{ 0, 2, 9, 21, 39, 63, 94, 132, 179, 236, 302, 379, 467, 565, 674, 792, diff --git a/mma8653/mma8653.go b/mma8653/mma8653.go index 64de1a6..a72f2a2 100644 --- a/mma8653/mma8653.go +++ b/mma8653/mma8653.go @@ -3,7 +3,6 @@ // // Datasheet: // https://www.nxp.com/docs/en/data-sheet/MMA8653FC.pdf -// package mma8653 // import "tinygo.org/x/drivers/mma8653" import "tinygo.org/x/drivers" diff --git a/mpu6050/mpu6050.go b/mpu6050/mpu6050.go index f920222..e707c14 100644 --- a/mpu6050/mpu6050.go +++ b/mpu6050/mpu6050.go @@ -4,7 +4,6 @@ // Datasheets: // https://store.invensense.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf // https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf -// package mpu6050 // import "tinygo.org/x/drivers/mpu6050" import "tinygo.org/x/drivers" diff --git a/net/http/client.go b/net/http/client.go index e717004..e6daef2 100644 --- a/net/http/client.go +++ b/net/http/client.go @@ -33,7 +33,6 @@ import ( // with the expectation that the Jar will insert those mutated cookies // with the updated values (assuming the origin matches). // If Jar is nil, the initial cookies are forwarded without change. -// type Client struct { // Transport specifies the mechanism by which individual // HTTP requests are made. @@ -125,11 +124,11 @@ type RoundTripper interface { // the following redirect codes, Get follows the redirect, up to a // maximum of 10 redirects: // -// 301 (Moved Permanently) -// 302 (Found) -// 303 (See Other) -// 307 (Temporary Redirect) -// 308 (Permanent Redirect) +// 301 (Moved Permanently) +// 302 (Found) +// 303 (See Other) +// 307 (Temporary Redirect) +// 308 (Permanent Redirect) // // An error is returned if there were too many redirects or if there // was an HTTP protocol error. A non-2xx response doesn't cause an @@ -152,11 +151,11 @@ func Get(url string) (resp *Response, err error) { // following redirect codes, Get follows the redirect after calling the // Client's CheckRedirect function: // -// 301 (Moved Permanently) -// 302 (Found) -// 303 (See Other) -// 307 (Temporary Redirect) -// 308 (Permanent Redirect) +// 301 (Moved Permanently) +// 302 (Found) +// 303 (See Other) +// 307 (Temporary Redirect) +// 308 (Permanent Redirect) // // An error is returned if the Client's CheckRedirect function fails // or if there was an HTTP protocol error. A non-2xx response doesn't diff --git a/net/http/cookie.go b/net/http/cookie.go index 141bc94..2155289 100644 --- a/net/http/cookie.go +++ b/net/http/cookie.go @@ -358,9 +358,11 @@ func sanitizeCookieName(n string) string { // https://tools.ietf.org/html/rfc6265#section-4.1.1 // cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) // cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E -// ; US-ASCII characters excluding CTLs, -// ; whitespace DQUOTE, comma, semicolon, -// ; and backslash +// +// ; US-ASCII characters excluding CTLs, +// ; whitespace DQUOTE, comma, semicolon, +// ; and backslash +// // We loosen this as spaces and commas are common in cookie values // but we produce a quoted cookie-value if and only if v contains // commas or spaces. diff --git a/net/http/cookiejar/jar.go b/net/http/cookiejar/jar.go index 15cef58..9a773f8 100644 --- a/net/http/cookiejar/jar.go +++ b/net/http/cookiejar/jar.go @@ -19,9 +19,9 @@ import ( ) // PublicSuffixList provides the public suffix of a domain. For example: -// - the public suffix of "example.com" is "com", -// - the public suffix of "foo1.foo2.foo3.co.uk" is "co.uk", and -// - the public suffix of "bar.pvt.k12.ma.us" is "pvt.k12.ma.us". +// - the public suffix of "example.com" is "com", +// - the public suffix of "foo1.foo2.foo3.co.uk" is "co.uk", and +// - the public suffix of "bar.pvt.k12.ma.us" is "pvt.k12.ma.us". // // Implementations of PublicSuffixList must be safe for concurrent use by // multiple goroutines. diff --git a/net/http/response.go b/net/http/response.go index d49f054..3015e52 100644 --- a/net/http/response.go +++ b/net/http/response.go @@ -105,8 +105,11 @@ func (r *Response) Cookies() []*Cookie { } // RFC 7234, section 5.4: Should treat +// // Pragma: no-cache +// // like +// // Cache-Control: no-cache func fixPragmaCacheControl(header Header) { if hp, ok := header["Pragma"]; ok && len(hp) > 0 && hp[0] == "no-cache" { diff --git a/net/http/server.go b/net/http/server.go index f497901..383d4f2 100644 --- a/net/http/server.go +++ b/net/http/server.go @@ -142,7 +142,7 @@ func Error(w ResponseWriter, error string, code int) { func NotFound(w ResponseWriter, r *Request) { Error(w, "404 page not found", StatusNotFound) } // NotFoundHandler returns a simple request handler -// that replies to each request with a ``404 page not found'' reply. +// that replies to each request with a “404 page not found” reply. func NotFoundHandler() Handler { return HandlerFunc(NotFound) } // StripPrefix returns a handler that serves HTTP requests by removing the @@ -435,7 +435,7 @@ func (mux *ServeMux) shouldRedirectRLocked(host, path string) bool { // the pattern that will match after following the redirect. // // If there is no registered handler that applies to the request, -// Handler returns a ``page not found'' handler and an empty pattern. +// Handler returns a “page not found” handler and an empty pattern. func (mux *ServeMux) Handler(r *Request) (h Handler, pattern string) { // CONNECT requests are not canonicalized. diff --git a/net/mqtt/paho.go b/net/mqtt/paho.go index c0d57a3..ff9c7af 100644 --- a/net/mqtt/paho.go +++ b/net/mqtt/paho.go @@ -42,9 +42,11 @@ const ( // with an MQTT server using non-blocking methods that allow work // to be done in the background. // An application may connect to an MQTT server using: -// A plain TCP socket -// A secure SSL/TLS socket -// A websocket +// +// A plain TCP socket +// A secure SSL/TLS socket +// A websocket +// // To enable ensured message delivery at Quality of Service (QoS) levels // described in the MQTT spec, a message persistence mechanism must be // used. This is done by providing a type which implements the Store diff --git a/net/net.go b/net/net.go index 5c10613..8654820 100644 --- a/net/net.go +++ b/net/net.go @@ -234,7 +234,6 @@ func (c *SerialConn) SetWriteDeadline(t time.Time) error { // ResolveTCPAddr returns an address of TCP end point. // // The network must be a TCP network name. -// func ResolveTCPAddr(network, address string) (*TCPAddr, error) { // TODO: make sure network is 'tcp' // separate domain from port, if any @@ -257,7 +256,6 @@ func ResolveTCPAddr(network, address string) (*TCPAddr, error) { // ResolveUDPAddr returns an address of UDP end point. // // The network must be a UDP network name. -// func ResolveUDPAddr(network, address string) (*UDPAddr, error) { // TODO: make sure network is 'udp' // separate domain from port, if any diff --git a/pca9685/pca9685.go b/pca9685/pca9685.go index 9940e0d..1fb5db6 100644 --- a/pca9685/pca9685.go +++ b/pca9685/pca9685.go @@ -51,7 +51,7 @@ func (d Dev) Configure(cfg PWMConfig) error { // SetPeriod updates the period of this PWM integrated circuit in nanoseconds. // To set a particular frequency, use the following formula: // -// period = 1e9 / frequency +// period = 1e9 / frequency // // In the equation above frequency is in Hertz. // @@ -91,7 +91,9 @@ func (d Dev) Top() uint32 { // Set sets the `on` value of a PWM channel in the range [0..15]. // Max value `on` can take is 4095. // Example: -// d.Set(1, d.Top()/4) +// +// d.Set(1, d.Top()/4) +// // sets the dutycycle of second (LED1) channel to 25%. func (d Dev) Set(channel uint8, on uint32) { if on > maxtop { @@ -101,7 +103,8 @@ func (d Dev) Set(channel uint8, on uint32) { } // SetAll sets all PWM signals to a ON value. Equivalent of calling -// Dev.Set(pca9685.ALLLED, value) +// +// Dev.Set(pca9685.ALLLED, value) func (d Dev) SetAll(on uint32) { d.Set(ALLLED, on) } @@ -140,8 +143,9 @@ func (d Dev) SetAI(ai bool) error { } // SetDrive configures PWM output connection in MODE2 register. -// false: The 16 LEDn outputs are configured with an open-drain structure. -// true: The 16 LEDn outputs are configured with a totem pole structure. +// +// false: The 16 LEDn outputs are configured with an open-drain structure. +// true: The 16 LEDn outputs are configured with a totem pole structure. func (d Dev) SetDrive(outdrv bool) error { err := d.readReg(MODE2, d.buf[:1]) if err != nil { @@ -156,10 +160,11 @@ func (d Dev) SetDrive(outdrv bool) error { } // Sleep sets/unsets SLEEP bit in MODE1. -// if sleepEnabled -// Stops PWM. Allows writing to PRE_SCALE register. -// else -// wakes PCA9685. Resumes PWM. +// +// if sleepEnabled +// Stops PWM. Allows writing to PRE_SCALE register. +// else +// wakes PCA9685. Resumes PWM. func (d Dev) Sleep(sleepEnabled bool) error { err := d.readReg(MODE1, d.buf[:1]) if err != nil { diff --git a/pcd8544/pcd8544.go b/pcd8544/pcd8544.go index e79c28f..3a843cb 100644 --- a/pcd8544/pcd8544.go +++ b/pcd8544/pcd8544.go @@ -1,7 +1,6 @@ // Package pcd8544 implements a driver for the PCD8544 48x84 pixels matrix LCD, used in Nokia's 5110 and 3310 phones. // // Datasheet: http://eia.udg.edu/~forest/PCD8544_1.pdf -// package pcd8544 // import "tinygo.org/x/drivers/pcd8544" import ( diff --git a/scd4x/scd4x.go b/scd4x/scd4x.go index 84d0d44..e605254 100644 --- a/scd4x/scd4x.go +++ b/scd4x/scd4x.go @@ -5,7 +5,6 @@ // This driver is heavily influenced by the scd4x code from Adafruit for CircuitPython: // https://github.com/adafruit/Adafruit_CircuitPython_SCD4X // Thank you! -// package scd4x // import "tinygo.org/x/drivers/scd4x" import ( diff --git a/semihosting/semihosting.go b/semihosting/semihosting.go index 95257db..b08097c 100644 --- a/semihosting/semihosting.go +++ b/semihosting/semihosting.go @@ -4,7 +4,7 @@ // If you want to use it in OpenOCD, you have to enable it first with the // following command: // -// arm semihosting enable +// arm semihosting enable package semihosting import ( diff --git a/sht3x/sht3x.go b/sht3x/sht3x.go index 9c84bc6..b4c88cf 100644 --- a/sht3x/sht3x.go +++ b/sht3x/sht3x.go @@ -3,7 +3,6 @@ // // Datasheet: // https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Datasheets/Sensirion_Humidity_Sensors_SHT3x_Datasheet_digital.pdf -// package sht3x // import "tinygo.org/x/drivers/sht3x" import ( diff --git a/shtc3/shtc3.go b/shtc3/shtc3.go index f8a483a..5e75b28 100644 --- a/shtc3/shtc3.go +++ b/shtc3/shtc3.go @@ -3,7 +3,6 @@ // // Datasheet: // https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Datasheets/Sensirion_Humidity_Sensors_SHTC3_Datasheet.pdf -// package shtc3 // import "tinygo.org/x/drivers/shtc3" import ( diff --git a/ssd1289/ssd1289.go b/ssd1289/ssd1289.go index a00ed18..f5cc22a 100644 --- a/ssd1289/ssd1289.go +++ b/ssd1289/ssd1289.go @@ -1,7 +1,6 @@ // Package ssd1289 implements a driver for the SSD1289 led matrix controller as packaged on the TFT_320QVT board // // Datasheet: http://aitendo3.sakura.ne.jp/aitendo_data/product_img/lcd/tft2/M032C1289TP/3.2-SSD1289.pdf -// package ssd1289 import ( diff --git a/ssd1306/ssd1306.go b/ssd1306/ssd1306.go index ebb76f2..e3742ac 100644 --- a/ssd1306/ssd1306.go +++ b/ssd1306/ssd1306.go @@ -1,7 +1,6 @@ // Package ssd1306 implements a driver for the SSD1306 led matrix controller, it comes in various colors and screen sizes. // // Datasheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf -// package ssd1306 // import "tinygo.org/x/drivers/ssd1306" import ( diff --git a/ssd1331/ssd1331.go b/ssd1331/ssd1331.go index d8835e9..0717c48 100644 --- a/ssd1331/ssd1331.go +++ b/ssd1331/ssd1331.go @@ -1,7 +1,6 @@ // Package ssd1331 implements a driver for the SSD1331 TFT color displays. // // Datasheet: https://www.crystalfontz.com/controllers/SolomonSystech/SSD1331/381/ -// package ssd1331 // import "tinygo.org/x/drivers/ssd1331" import ( diff --git a/ssd1351/ssd1351.go b/ssd1351/ssd1351.go index f064e34..3561dd6 100644 --- a/ssd1351/ssd1351.go +++ b/ssd1351/ssd1351.go @@ -1,7 +1,6 @@ // Package ssd1351 implements a driver for the SSD1351 OLED color displays. // // Datasheet: https://download.mikroe.com/documents/datasheets/ssd1351-revision-1.3.pdf -// package ssd1351 // import "tinygo.org/x/drivers/ssd1351" import ( diff --git a/st7735/st7735.go b/st7735/st7735.go index c5f8c5e..cd0f19d 100644 --- a/st7735/st7735.go +++ b/st7735/st7735.go @@ -1,7 +1,6 @@ // Package st7735 implements a driver for the ST7735 TFT displays, it comes in various screen sizes. // // Datasheet: https://www.crystalfontz.com/controllers/Sitronix/ST7735R/319/ -// package st7735 // import "tinygo.org/x/drivers/st7735" import ( diff --git a/st7789/st7789.go b/st7789/st7789.go index ad60627..6802f12 100644 --- a/st7789/st7789.go +++ b/st7789/st7789.go @@ -1,8 +1,8 @@ // Package st7789 implements a driver for the ST7789 TFT displays, it comes in various screen sizes. // // Datasheets: https://cdn-shop.adafruit.com/product-files/3787/3787_tft_QT154H2201__________20190228182902.pdf -// http://www.newhavendisplay.com/appnotes/datasheets/LCDs/ST7789V.pdf // +// http://www.newhavendisplay.com/appnotes/datasheets/LCDs/ST7789V.pdf package st7789 // import "tinygo.org/x/drivers/st7789" import ( @@ -176,7 +176,6 @@ func (d *Device) Sync() { // NOTE: Use GetHighestScanLine and GetLowestScanLine to obtain the highest // and lowest useful values. Values are affected by front and back porch // vsync settings (derived from VSyncLines configuration option). -// func (d *Device) SyncToScanLine(scanline uint16) { scan := d.GetScanLine() diff --git a/sx126x/spi_stm32wl.go b/sx126x/spi_stm32wl.go index 540dd5b..d072361 100644 --- a/sx126x/spi_stm32wl.go +++ b/sx126x/spi_stm32wl.go @@ -26,7 +26,7 @@ func New(spi drivers.SPI) *Device { return &d } -//SpiSetNss Sets the NSS line +// SpiSetNss Sets the NSS line func (d *Device) SpiSetNss(state bool) { if state { stm32.PWR.SUBGHZSPICR.SetBits(stm32.PWR_SUBGHZSPICR_NSS) diff --git a/sx126x/sx126x.go b/sx126x/sx126x.go index 5f9a173..6537259 100644 --- a/sx126x/sx126x.go +++ b/sx126x/sx126x.go @@ -96,9 +96,11 @@ func timeoutMsToRtcSteps(timeoutMs uint32) uint32 { } // -------------------------------------------------- -// Channel and events +// +// Channel and events +// // -------------------------------------------------- -//NewRadioEvent() returns a new RadioEvent that can be used in the RadioChannel +// NewRadioEvent() returns a new RadioEvent that can be used in the RadioChannel func NewRadioEvent(eType int, irqStatus uint16, eData []byte) RadioEvent { r := RadioEvent{EventType: eType, IRQStatus: irqStatus, EventData: eData} return r @@ -573,7 +575,7 @@ func (d *Device) SetLoraCrc(enable bool) { } } -//SetLoraSpreadingFactor setc surrent Lora Spreading Factor +// SetLoraSpreadingFactor setc surrent Lora Spreading Factor // NB: Change will be applied at next RX / TX func (d *Device) SetLoraSpreadingFactor(sf uint8) { d.loraConf.Sf = sf diff --git a/tester/tester.go b/tester/tester.go index 4cbdc22..e9c59db 100644 --- a/tester/tester.go +++ b/tester/tester.go @@ -1,7 +1,6 @@ // Package tester contains mock structs to make it easier to test I2C devices. // // TODO: info on how to use this. -// package tester // import "tinygo.org/x/drivers/tester" // Failer is used by the I2CDevice type to abort when it's used in diff --git a/thermistor/thermistor.go b/thermistor/thermistor.go index 92175d8..5b56c0c 100644 --- a/thermistor/thermistor.go +++ b/thermistor/thermistor.go @@ -13,17 +13,16 @@ // To use with other thermistors adjust the BCoefficient and NominalTemperature // values to match the specific thermistor you wish to use. // -// sensor.NominalTemperature = 25 -// sensor.BCoefficient = 3950 +// sensor.NominalTemperature = 25 +// sensor.BCoefficient = 3950 // // Set the SeriesResistor and NominalResistance based on the microcontroller voltage and // circuit that you have in use. Set HighSide based on if the thermistor is connected from // the ADC pin to the powered side (true) or to ground (false). // -// sensor.SeriesResistor = 10000 -// sensor.NominalResistance = 10000 -// sensor.HighSide = true -// +// sensor.SeriesResistor = 10000 +// sensor.NominalResistance = 10000 +// sensor.HighSide = true package thermistor // import "tinygo.org/x/drivers/thermistor" import ( diff --git a/tm1637/tm1637.go b/tm1637/tm1637.go index cbaa6eb..581a5b6 100644 --- a/tm1637/tm1637.go +++ b/tm1637/tm1637.go @@ -1,7 +1,6 @@ // Package tm1637 provides a driver for the TM1637 4-digit 7-segment LED display. // // Datasheet: https://www.mcielectronics.cl/website_MCI/static/documents/Datasheet_TM1637.pdf -// package tm1637 import ( diff --git a/tone/tone.go b/tone/tone.go index 8061df8..9cf5f0e 100644 --- a/tone/tone.go +++ b/tone/tone.go @@ -45,7 +45,7 @@ func (s Speaker) Stop() { // SetPeriod sets the period for the signal in nanoseconds. Use the following // formula to convert frequency to period: // -// period = 1e9 / frequency +// period = 1e9 / frequency // // You can also use s.SetNote() instead for MIDI note numbers. func (s Speaker) SetPeriod(period uint64) { diff --git a/uc8151/uc8151.go b/uc8151/uc8151.go index 8ec06b6..866b321 100644 --- a/uc8151/uc8151.go +++ b/uc8151/uc8151.go @@ -2,7 +2,6 @@ // // Inspired by https://github.com/pimoroni/pimoroni-pico/blob/main/drivers/uc8151/uc8151.cpp // Datasheet: https://www.buydisplay.com/download/ic/UC8151C.pdf -// package uc8151 // import "tinygo.org/x/drivers/uc8151" import ( diff --git a/veml6070/veml6070.go b/veml6070/veml6070.go index f821ed7..0dcde14 100644 --- a/veml6070/veml6070.go +++ b/veml6070/veml6070.go @@ -5,7 +5,6 @@ // https://www.vishay.com/docs/84277/veml6070.pdf // Application Notes: // https://www.vishay.com/docs/84310/designingveml6070.pdf -// package veml6070 // import "tinygo.org/x/drivers/veml6070" import ( diff --git a/vl53l1x/vl53l1x.go b/vl53l1x/vl53l1x.go index 3497d1d..927098b 100644 --- a/vl53l1x/vl53l1x.go +++ b/vl53l1x/vl53l1x.go @@ -6,7 +6,6 @@ // This driver was based on the library https://github.com/pololu/vl53l1x-arduino // and ST's VL53L1X API (STSW-IMG007) // https://www.st.com/content/st_com/en/products/embedded-software/proximity-sensors-software/stsw-img007.html -// package vl53l1x // import "tinygo.org/x/drivers/vl53l1x" import ( diff --git a/vl6180x/vl6180x.go b/vl6180x/vl6180x.go index 14db261..8029f11 100644 --- a/vl6180x/vl6180x.go +++ b/vl6180x/vl6180x.go @@ -5,7 +5,6 @@ // This driver was based on the library https://github.com/adafruit/Adafruit_VL6180X // and document 'AN4545 VL6180X basic ranging application note': // https://www.st.com/resource/en/application_note/an4545-vl6180x-basic-ranging-application-note-stmicroelectronics.pdf -// package vl6180x // import "tinygo.org/x/drivers/vl6180x" import ( diff --git a/waveshare-epd/epd2in13/epd2in13.go b/waveshare-epd/epd2in13/epd2in13.go index 14b2a5e..c0d190f 100644 --- a/waveshare-epd/epd2in13/epd2in13.go +++ b/waveshare-epd/epd2in13/epd2in13.go @@ -1,7 +1,6 @@ // Package epd2in13 implements a driver for Waveshare 2.13in black and white e-paper device. // // Datasheet: https://www.waveshare.com/w/upload/e/e6/2.13inch_e-Paper_Datasheet.pdf -// package epd2in13 // import "tinygo.org/x/drivers/waveshare-epd/epd2in13" import ( diff --git a/waveshare-epd/epd2in13x/epd2in13x.go b/waveshare-epd/epd2in13x/epd2in13x.go index 9d3be40..b84f5a5 100644 --- a/waveshare-epd/epd2in13x/epd2in13x.go +++ b/waveshare-epd/epd2in13x/epd2in13x.go @@ -1,7 +1,6 @@ // Package epd2in13x implements a driver for Waveshare 2.13in (B & C versions) tri-color e-paper device. // // Datasheet: https://www.waveshare.com/w/upload/d/d3/2.13inch-e-paper-b-Specification.pdf -// package epd2in13x // import "tinygo.org/x/drivers/waveshare-epd/epd2in13x" import ( diff --git a/waveshare-epd/epd2in9/epd2in9.go b/waveshare-epd/epd2in9/epd2in9.go index 1400f4d..994cd79 100644 --- a/waveshare-epd/epd2in9/epd2in9.go +++ b/waveshare-epd/epd2in9/epd2in9.go @@ -3,12 +3,12 @@ // Note: this is for the V1 device (using IL3820), the V2 device uses a different chipset. // // Datasheets: -// https://www.waveshare.com/w/upload/e/e6/2.9inch_e-Paper_Datasheet.pdf -// https://www.smart-prototyping.com/image/data/9_Modules/EinkDisplay/GDE029A1/IL3820.pdf +// +// https://www.waveshare.com/w/upload/e/e6/2.9inch_e-Paper_Datasheet.pdf +// https://www.smart-prototyping.com/image/data/9_Modules/EinkDisplay/GDE029A1/IL3820.pdf // // This implementation is essentially a copy of the 2in13 driver with the correct LUTs and // default size for the 2.9in device. -// package epd2in9 // import "tinygo.org/x/drivers/waveshare-epd/epd2in9" import ( diff --git a/waveshare-epd/epd4in2/epd4in2.go b/waveshare-epd/epd4in2/epd4in2.go index 7c62a7e..902d21e 100644 --- a/waveshare-epd/epd4in2/epd4in2.go +++ b/waveshare-epd/epd4in2/epd4in2.go @@ -1,11 +1,11 @@ // Package epd4in2 implements a driver for Waveshare 4.2in black and white e-paper device. // // Derived from: -// https://github.com/tinygo-org/drivers/tree/master/waveshare-epd -// https://github.com/waveshare/e-Paper/blob/master/Arduino/epd4in2/epd4in2.cpp +// +// https://github.com/tinygo-org/drivers/tree/master/waveshare-epd +// https://github.com/waveshare/e-Paper/blob/master/Arduino/epd4in2/epd4in2.cpp // // Datasheet: https://www.waveshare.com/wiki/4.2inch_e-Paper_Module -// package epd4in2 import ( diff --git a/wifinina/wifinina.go b/wifinina/wifinina.go index 247a839..c493035 100644 --- a/wifinina/wifinina.go +++ b/wifinina/wifinina.go @@ -3,7 +3,6 @@ // // In order to use this driver, the ESP32 must be flashed with specific firmware from Arduino. // For more information: https://github.com/arduino/nina-fw -// package wifinina // import "tinygo.org/x/drivers/wifinina" import ( @@ -265,7 +264,6 @@ func (err Error) Error() string { // |___________|______|______|_________|___________|________|____|_________| // | 8 bit | 1bit | 7bit | 8bit | 8bit | nbytes | .. | 8bit | // |___________|______|______|_________|___________|________|____|_________| -// type command struct { cmd uint8 reply bool