all: correct go fmt

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2022-09-25 10:16:18 +02:00
committed by Ron Evans
parent 98ba5a231a
commit 1bb1b621c6
85 changed files with 153 additions and 197 deletions
-1
View File
@@ -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 (
-1
View File
@@ -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"
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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"
+1 -1
View File
@@ -3,7 +3,6 @@
//
// Datasheet:
// https://cdn-shop.adafruit.com/datasheets/BST-BME280_DS001-10.pdf
//
package bme280
import (
@@ -149,6 +148,7 @@ 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
func (d *Device) ReadAltitude() (alt int32, err error) {
mPa, _ := d.ReadPressure()
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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"
-1
View File
@@ -2,7 +2,6 @@
//
// Datasheet:
// https://datasheets.maximintegrated.com/en/ds/DS1307.pdf
//
package ds1307 // import "tinygo.org/x/drivers/ds1307"
import (
-1
View File
@@ -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 (
-2
View File
@@ -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,
-1
View File
@@ -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 (
+1 -1
View File
@@ -2,7 +2,6 @@
// panel controller.
//
// Datasheet: https://focuslcds.com/content/FT6236.pdf
//
package ft6336
import (
@@ -42,6 +41,7 @@ func (d *Device) Configure(config Config) error {
}
// SetGMode sets interrupt mode.
//
// 0x00 : Interrupt Polling mode
// 0x01 : Interrupt Trigger mode (default)
func (d *Device) SetGMode(v uint8) {
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -2,7 +2,6 @@
// with an I2C adapter.
//
// Datasheet: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
//
package hd44780i2c
import (
-2
View File
@@ -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
-1
View File
@@ -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 (
@@ -7,13 +7,13 @@ 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
// - 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
// - 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
@@ -124,12 +124,17 @@ 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
//
// maxBits The maximum number of bits that should be used to encode any literal.
//
// 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.
func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
if maxBits >= maxBitsLimit {
+2
View File
@@ -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
//
// 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
-1
View File
@@ -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
+2 -1
View File
@@ -7,11 +7,12 @@
// https://www.adafruit.com/product/3163
//
// Datasheet:
//
// 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 (
-1
View File
@@ -38,7 +38,6 @@ type DeviceAdafruitCharlieWing15x7 struct {
// | + - - - - - - - - - - - - - +
// |
// start (address 0x00)
//
func (d *DeviceAdafruitCharlieWing15x7) enableLEDs() (err error) {
for frame := FRAME_0; frame <= FRAME_7; frame++ {
err = d.selectCommand(frame)
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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"
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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"
-1
View File
@@ -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
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-2
View File
@@ -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,
-1
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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.
+2
View File
@@ -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
//
// 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.
+3
View File
@@ -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" {
+2 -2
View File
@@ -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.
+2
View File
@@ -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
//
// 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
-2
View File
@@ -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
+5
View File
@@ -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)
//
// sets the dutycycle of second (LED1) channel to 25%.
func (d Dev) Set(channel uint8, on uint32) {
if on > maxtop {
@@ -101,6 +103,7 @@ 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)
func (d Dev) SetAll(on uint32) {
d.Set(ALLLED, on)
@@ -140,6 +143,7 @@ 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.
func (d Dev) SetDrive(outdrv bool) error {
@@ -156,6 +160,7 @@ 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
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
+1 -2
View File
@@ -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()
+2
View File
@@ -96,7 +96,9 @@ func timeoutMsToRtcSteps(timeoutMs uint32) uint32 {
}
// --------------------------------------------------
//
// Channel and events
//
// --------------------------------------------------
// NewRadioEvent() returns a new RadioEvent that can be used in the RadioChannel
func NewRadioEvent(eType int, irqStatus uint16, eData []byte) RadioEvent {
-1
View File
@@ -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
-1
View File
@@ -23,7 +23,6 @@
// sensor.SeriesResistor = 10000
// sensor.NominalResistance = 10000
// sensor.HighSide = true
//
package thermistor // import "tinygo.org/x/drivers/thermistor"
import (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
-1
View File
@@ -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 (
+1 -1
View File
@@ -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
//
// 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 (
+1 -1
View File
@@ -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
//
// Datasheet: https://www.waveshare.com/wiki/4.2inch_e-Paper_Module
//
package epd4in2
import (
-2
View File
@@ -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