Instead of printing an error, this driver really should be returning
errors instead. Also, `Configure` didn't have a way to actually
configure the driver. This is now added, and can be expanded in the
future.
This is a breaking change.
fixed the spelling in the Connection error message; Initial support for LSM303DLHC added;
Added LSM303DLHC to smoketest and added an example;
Removed unnecessary comments;
fixed format error;
squashed and ready for merge;
* ssd1306: avoid unnecessary heap allocations
* ssd1306: extract i2c and spi bus implementations
* ssd1306: refactor tests -- show fps and heap usage
* ssd1306: bring back the lost exported methods
* Adjust examples
* Fix smoketests for ssd1306
Adafruit's Mini GPS PA1010D Module works with this device driver, but requires 0x10 as the address, rather than 0x42.
This change allows the device to be initialised with whatever i2c address is needed, while maintaining backward compatibility.
Adds new constants to allow easy configuration of both the ublox device and the PA1010D.
TMC5160: Added TMC5160 support
* Added example code for tmc5160 and smoke test
* Update go.mod
* Updated mod file
* Cleaned up commented out code and updated readme.
* ran go fmt
* Fixed setrampspeed func
* Removed spi1 pin setup in example.go. Renamed SPIComm to spicomm.go
* Removed unused test file
* Removed commented line
Tested on the following chips/boards:
* RP2040 (Raspberry Pi Pico)
* ATSAMD21 (Adafruit PyBadge)
* NRF52840 (PCA10056 developer board)
* ESP8266 (NodeMCU)
* ATmega328p (Arduino Uno)
* ESP32C3 (WaveShare ESP-C3-32S-Kit)
* FE310 (SiFive HiFive1 rev B)
The sensitivity threshold in the example may need to be adjusted per
board though, the default value of 100 typically recognizes when a cable
is being touched but the RP2040 for example is capable of doing much
more precise measurements if the power supply is sufficiently
noise-free.
According to man page accept(2), accept returns new client sockfd and
remote peer ip:port. This patch corrects the Accept() prototype in the
netdever interface to not take in an ip:port arg, but rather return an
ip:port for remote peer.
Tested with examples/net/tcpecho on wioterminal and nano-rp2040. Here's
a run with wioterminal:
SERVER
============
sfeldma@nuc:~/work/drivers$ tinygo flash -monitor -target wioterminal -size short -stack-size=8kb ./examples/net/tcpecho
code data bss | flash ram
110876 2552 11212 | 113428 13764
Connected to /dev/ttyACM2. Press Ctrl-C to exit.
Realtek rtl8720dn Wifi network device driver (rtl8720dn)
Driver version : 0.0.1
RTL8720 firmware version : 2.1.2
MAC address : 2c:f7:f1:1c:9b:2f
Connecting to Wifi SSID 'test'...CONNECTED
DHCP-assigned IP : 10.0.0.140
DHCP-assigned subnet : 255.255.255.0
DHCP-assigned gateway : 10.0.0.1
Starting TCP server listening on :8080
Client 10.0.0.190:50000 connected
Client 10.0.0.190:50000 closed
CLIENT
=============
nc -p 50000 10.0.0.140 8080
This moves the netdev/netlink namespace out of drivers and into their
own packages. Also, defines netdev and netlink as L3/L4 and L2 OSI
layers, respectively. Move some L3 functionality from netlink to
netdev (GetIPAddr).
For netlink, add ConnectParams for NetConnect to pass in L2 connection
parameters (ssid, pass, auth_type, etc). Also adds connection mode
(STA, AP, etc).
For netlink, add SendEth and RecvEthFunc funcs to handle L2 send/recv of
Ethernet pkts.
Tested with a rp2040.
TODO: add the ability to set the absolute humidity for more accurate
sensor details. The formula for that is rather complex, so I've left
this as a future addition.
Replace DrawRGBBitmap8 with DrawBitmap, following the change in the
previous commit.
This improves performance from 86fps to 100fps! I didn't investigate
why, but I suspect it's because it now needs only a single store instead
of two to update a pixel.
I wrote this for the PineTime, and all available sensors (accelerometer,
step counter, temperature sensor) do work.
This commit also includes two "configuration files", that actually
appear to be firmware files to run on the accelerometer for special
features like step counting.
I'm not sure where they originally came for, and I don't know the
copyright status of them. However, Bosch has open-sourced the BMA423
driver which includes a similar binary blob and the InfiniTime and
Wasp-OS projects have been shipping these blobs without issues, so I
think it's reasonably safe to include these binary blobs directly in the
source.