Commit Graph

754 Commits

Author SHA1 Message Date
deadprogram 0e2fb829ef gps: improvements and corrections for config commands
This contains some improvements and corrections for the gps driver
It adds some additional functions for different modes (automobile, bike, etc)
and also ignores the return results from any config commands.

Basically due to the fact that there is a constant stream of updates
coming from NMEA messages, the results from sending any UBX commands
are getting lost. Better to just ignore them for now.

Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-14 19:55:43 +00:00
deadprogram 892265b733 gps: export some errors for checking/supression from client
Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-08 13:05:41 +00:00
Pat Whittingslow b390e3225a Suggestions by pato for GPS UBX support (#831)
* apply suggestions by pato

* whoopsie on inverted condition
2026-01-08 13:05:41 +00:00
deadprogram 1513808425 gps: revamp validSentence() to avoid heap allocation for errors. This error can occur too frequently to allow for such allocations
Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-08 13:05:41 +00:00
deadprogram 0a41786a77 gps: improve implementation for UBX config commands
Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-08 13:05:41 +00:00
deadprogram c21cd39813 si5351: complete refactor for more complete interface
This completely refactors the interface and implementation
for the si5351 clock generator. The interface based on the
Arduino implementation was both somewhat hard to work with
and also missing a number of important features that are
needed to use this chip for RF communication.

Instead this new implementation draws inspiration from the
efforts of the Traquino community mostly using the rp2040
processor.

The TinyGo implementation is based on the patterns and code
in the drivers repo for other i2c devices. It also includes
some basic unit tests which are not comprehensive but at
least provide some coverage.

Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-07 19:58:27 +00:00
deadprogram a35786be70 sx127x: add functions used for FSK radio communication
Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-03 16:49:21 +00:00
Yurii Soldak 2a42fa7cbb st7735: remove dependency on the machine package 2025-12-22 08:59:05 +00:00
deadprogram 5d96a56603 build: use the latest TinyGo release container instead of the dev container for builds.
Signed-off-by: deadprogram <ron@hybridgroup.com>
2025-12-17 10:28:24 +00:00
deadprogram f931ad44fb Release 0.34
Signed-off-by: deadprogram <ron@hybridgroup.com>
v0.34.0
2025-12-15 15:13:56 +00:00
deadprogram 50778af656 si5351: add many missing functions needed for convenient use.
This adds many missing functions needed for convenient use that are
reinterpreted from the C code in https://github.com/dmalnati/picoinf

Thank you!

Signed-off-by: deadprogram <ron@hybridgroup.com>
2025-12-11 17:59:07 +00:00
Mike Hughes 936a255df9 Add support for CEVA BNO08x 9DoF sensor (#809)
* Add support for CEVA BNO08x 9DoF sensor. Also includes implementation of CEVA SH-2 and SHTP protocols.

* Replace machine.I2C with drivers.I2C interface to remove dependency on machine package

* Replace Pin functionality with that provided by tinygo.org/x/drivers/internal/pin

* Unexport fields on SensorValue and replace with accessor methods. Add check for correct SensorID validation

* Add example to smoketest.sh

* Change build target for smoketest to match development environment.. Probably not important, but matches reality.

* Fix decoding of some sensor data: Step Counter, Tap Detector, Flip Detector. These are experimental.

* Refactor to allow SPI/UART etc. SPI is currently under development, but is omitted from this commit.

Example code has been moved to i2c subdirectory.

This commit introduces some major refactoring changes. It introduces a "Buser" interface and tries to remove any I2C specific code from the core. It still retains a couple of I2C specific fields in the "Config" struct ("Address" and "ReadChunk") but they are ignored in the as yet uncommited SPI code.

* Fix CRLF -> LF for gofmt

* Update smoketest to point to new example file
2025-12-10 19:07:04 +01:00
Ayke van Laethem 9ed648f4a5 scd4x: add support for SCD41 single-shot measurements
I have a SCD41, and would like to use it for single shot measurements
instead of "low power periodic" measurements to achieve much lower
average current consumption.
2025-12-04 11:25:41 +00:00
Ayke van Laethem fab688a701 scd4x: remove dead code 2025-12-01 08:56:40 +00:00
Ayke van Laethem d4654668f2 scd4x: update package to use standard methods
This deprecates the older Read* methods and uses standard Update() and
sensor data getters instead.

Apart from being more efficient, this also makes the driver more
efficient when reading multiple sensors (since the SCD4x sensor won't
get polled for new data at each Read* method call).
2025-12-01 08:56:40 +00:00
sago35 253f8e3220 pixel: add Grayscale2bit color (#817)
* pixel: add GrayScale2bit color
* pixel: fix spelling of 'GrayScale' to 'Grayscale'
2025-11-15 09:02:55 +01:00
Yurii Soldak c710cc8236 ssd1xxx: break dependency from machine package (#812)
* ssd1xxx: break dependency from machine package
* fix ssd1289 example
* simplify
2025-11-12 09:40:34 +01:00
Nicholas Wiersma 4b831af52b w5500: initial version the driver (#788)
Thank you, @nrwiersma for working on this and @soypat for review. Now merging.
2025-11-12 09:00:21 +01:00
Patricio Whittingslow 09fd01340b add simplest driver ports 2025-11-11 10:42:28 +01:00
gkits 23833e69c7 DS3231 Alarm features (#805)
* Added alarm features
* more functions
* chore: fix typo
* feat(ds3231): add Alarm2Mode type and mode consts
* docs(ds3231): add docstrings for SQW functions
* feat(ds3231): add methods for Alarm2
* fix(ds3231): use Alarm2Mode for SetAlarm2 method
* docs(ds3231): add example for alarms
* docs(ds3231): refactor alarms example
* make main function more concise to avoid llvm error for pico
* ci(ds3231): split basic and alarm tests
* style(ds3231): reorder private funcs to the bottom
* docs(ds3231): add docstring for alarm modes
* docs(ds3231): make alarm docstrings more descriptive
* chore(ds3231): fix typo in docstring
* style(ds3231): reorder public functions
* style(ds3231): reorder private methods
* chore(ds3231): add missing error handling
* feat(ds3231): use setter funcs for en/disabling instead of separate funcs
* fix(ds3231): correctly enable alarms in example
* style(ds3231): rename SetEnable32K to SetEnabled32K for consistency
* refactor(ds3231): replace legacy with regmap package
* refactor(ds3231): use Write32 instead of Tx for SetAlarm1
* chore(ds3231): remove fmt deps and and use println in examples
* refactor(ds3231): read temperature as uint16

---------

Co-authored-by: Matthias Fulz <mfulz@olznet.de>
2025-11-11 10:22:28 +01:00
sago35 744fda5eec fix: correct logic error in image size checks in pixel's tests (Monochrome) 2025-11-10 12:28:58 +01:00
sago35 027c91272e pixel: correct RGB555 to RGBA conversion logic 2025-11-10 12:28:58 +01:00
sago35 5847506ba6 Add TestImageRGB888 and TestImageRGB555 2025-11-10 12:28:58 +01:00
sago35 e35e6b8e13 fix: correct logic error in image size checks in pixel's tests 2025-11-10 12:28:58 +01:00
Ron Evans 408851a9f5 si5351: add support for si5351 (#810)
* si5351: add support for si5351

Adds support for the si5351 I2C programmable clock generator using code
from @chiefMarlin which used code from @conotto which somehow never got merged.

Thank you everyone!

Signed-off-by: deadprogram <ron@hybridgroup.com>

* refactor: use regmap instead of legacy package to avoid heap allocations

Signed-off-by: deadprogram <ron@hybridgroup.com>

---------

Signed-off-by: deadprogram <ron@hybridgroup.com>
2025-11-10 08:04:25 -03:00
Pat Whittingslow bd88b70511 regmap: Add Device8I2C/SPI types and their logic (#801)
* add regmap Device8I2C/SPI types and their methods
* add endianess hint
2025-11-09 14:05:30 +01:00
Yurii Soldak 34da2d208a lsm9ds1: avoid unnecessary heap allocations 2025-11-08 10:53:22 +01:00
Pat Whittingslow 5cb360a4bf Add Honeywell HSC TruStability SPI+I2C pressure sensor driver (#799)
* add honeywell pressure sensor
* apply @aykevl suggestions
2025-11-08 10:45:18 +01:00
Ayke van Laethem 51b604ce97 lis3dh: add Update and Acceleration calls
This adjusts the API to the one proposed in
https://github.com/tinygo-org/drivers/pull/345, which I think is much
better than direct ReadAcceleration etc calls.

I have also updated the code that converts raw acceleration values to
normalized values. The new code should be faster (didn't measure) and
avoids floating point math.
2025-11-08 10:34:37 +01:00
Ayke van Laethem ec680be784 lis3dh: use correct error handling and make configurable
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.
2025-11-08 10:34:37 +01:00
Pat Whittingslow 5fb935001e PinInput+PinOutput HAL (#753, reloaded) (#795)
* first commit: add HAL and uc8151 driver demo
* unexport drivers.PinOutput/Input HAL
* fix non-tinygo pin config build
* change of heart
* docs: corrected some comments that were not changed at the same time as recent renaming
2025-11-08 10:21:01 +01:00
Martin Heck 297ad416d3 fix: add RP2350 to quadrature_interrupt.go 2025-09-23 14:03:35 +02:00
soypat 3fa08112db add regmap package to facilitate heapless driver development 2025-09-14 08:12:32 -04:00
Bryan Souza b639f7b12e added support for P25Q16H flash chip for xiao-ble target; 2025-09-14 08:11:14 -04:00
Bryan Souza 28d625abfd added support for W25Q80DV flash chip for xiao-ble target; 2025-09-14 08:11:14 -04:00
deadprogram 228e57cf98 release: prepare for 0.33.0 drivers release
Signed-off-by: deadprogram <ron@hybridgroup.com>
v0.33.0
2025-08-19 21:57:30 +02:00
deadprogram 6cf1eb86e5 fix: correct smoke tests for Adafruit Seesaw
Signed-off-by: deadprogram <ron@hybridgroup.com>
2025-08-18 14:51:03 +02:00
JP Hastings-Spital 857ab80ae6 feat: add support for seesaw encoders
Adds the necessary function addresses for reading and writing encoders on a seesaw.
Also provides two helper functions to make this easier.
2025-08-18 14:15:48 +02:00
Russel Hunter Yukawa a31ba26a6c Fix gps time calculation (#785)
* Change test case to match the date patterns where the bug reproduces
* Fix RMC date and time calculation
2025-08-13 09:39:18 +02:00
Bryan Souza 303ec94529 added support for LSM303DLHC e-Compass; (#783)
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;
2025-08-11 08:47:22 +02:00
Artur Nasyrov 833990f44d Add ens160 i2c driver
Driver for ENS160 sensor:
https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf
2025-08-10 10:05:18 +02:00
Ayke van Laethem 28d87eb0c5 ws2812: add RP2350 support
Adding 150MHz support for the RP2350
2025-08-10 10:05:18 +02:00
Yurii Soldak ae9e8f915e ssd1306: avoid unnecessary heap allocations (#767)
* 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
2025-08-10 10:05:18 +02:00
JP Hastings-Spital 45fad80c3e feat: allow gps init with address
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.
2025-08-10 10:05:18 +02:00
Yurii Soldak 0304d30b78 lsm6ds3tr: avoid unnecessary heap allocations (#766)
* lsm6ds3tr: avoid unnecessary heap allocations
* lsm6ds3tr: use helper functions, for readability
* lsm6ds3tr: return slice of the internal buffer on readBytes
2025-08-10 10:05:18 +02:00
Ron Evans 7de0a0814e Revert "add regmap package to facilitate heapless driver development (#768)" (#776)
This reverts commit 80356fd9d9.
2025-07-14 11:16:56 -03:00
Patricio Whittingslow 80356fd9d9 add regmap package to facilitate heapless driver development (#768) 2025-07-13 09:58:49 -03:00
deadprogram c4ff8242a7 all: updates for drivers release v0.32.0
Signed-off-by: deadprogram <ron@hybridgroup.com>
v0.32.0
2025-06-15 22:36:34 +02:00
soypat 82c41dbf14 add driver design pointer to CONTRIBUTING.md 2025-05-28 11:03:09 +02:00
Hikmatulloh Hari Mukti c4168864fd bmp280: remove alloc on read sensor data 2025-05-28 10:29:08 +02:00