Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e7f9016
tmc2209 bug fixes (#755)
cswank May 20, 2025
d41bc0b
fix: remove time.Sleep from SSD1306 SPI transfer code
mateusznowakdev May 6, 2025
dbc9022
ws2812: add 200MHz support for the Cortex-M0/rp2040
leon-matthews May 11, 2025
c416886
bmp280: remove alloc on read sensor data
muktihari May 15, 2025
82c41db
add driver design pointer to CONTRIBUTING.md
soypat Apr 8, 2025
c4ff824
all: updates for drivers release v0.32.0
deadprogram Jun 13, 2025
80356fd
add regmap package to facilitate heapless driver development (#768)
soypat Jul 13, 2025
7de0a08
Revert "add regmap package to facilitate heapless driver development …
deadprogram Jul 14, 2025
0304d30
lsm6ds3tr: avoid unnecessary heap allocations (#766)
ysoldak Jun 25, 2025
45fad80
feat: allow gps init with address
jphastings Jun 30, 2025
ae9e8f9
ssd1306: avoid unnecessary heap allocations (#767)
ysoldak Jul 13, 2025
28d87eb
ws2812: add RP2350 support
aykevl Jun 16, 2025
833990f
Add ens160 i2c driver
nsr888 Jul 25, 2025
303ec94
added support for LSM303DLHC e-Compass; (#783)
BryanSouza91 Aug 11, 2025
a31ba26
Fix gps time calculation (#785)
rhykw Aug 13, 2025
857ab80
feat: add support for seesaw encoders
jphastings Jun 30, 2025
6cf1eb8
fix: correct smoke tests for Adafruit Seesaw
deadprogram Aug 18, 2025
228e57c
release: prepare for 0.33.0 drivers release
deadprogram Aug 19, 2025
28d625a
added support for W25Q80DV flash chip for xiao-ble target;
BryanSouza91 Sep 12, 2025
b639f7b
added support for P25Q16H flash chip for xiao-ble target;
BryanSouza91 Sep 12, 2025
3fa0811
add regmap package to facilitate heapless driver development
soypat Jun 21, 2025
297ad41
fix: add RP2350 to quadrature_interrupt.go
mheck136 Sep 23, 2025
5fb9350
PinInput+PinOutput HAL (#753, reloaded) (#795)
soypat Nov 8, 2025
ec680be
lis3dh: use correct error handling and make configurable
aykevl Oct 11, 2025
51b604c
lis3dh: add Update and Acceleration calls
aykevl Oct 11, 2025
5cb360a
Add Honeywell HSC TruStability SPI+I2C pressure sensor driver (#799)
soypat Nov 8, 2025
34da2d2
lsm9ds1: avoid unnecessary heap allocations
ysoldak Oct 17, 2025
bd88b70
regmap: Add Device8I2C/SPI types and their logic (#801)
soypat Nov 9, 2025
38c6a59
Added alarm features
May 11, 2025
390a506
more functions
May 27, 2025
2c6b7ec
chore: fix typo
gKits Jul 24, 2025
e33c3c9
feat(ds3231): add Alarm2Mode type and mode consts
gKits Jul 24, 2025
f44afa7
docs(ds3231): add docstrings for SQW functions
gKits Jul 24, 2025
9f693b1
feat(ds3231): add methods for Alarm2
gKits Jul 24, 2025
7fe6ebe
fix(ds3231): use Alarm2Mode for SetAlarm2 method
gKits Jul 24, 2025
97f1ad1
docs(ds3231): add example for alarms
gKits Jul 24, 2025
6e8e7ee
docs(ds3231): refactor alarms example
gKits Jul 24, 2025
54437cf
ci(ds3231): split basic and alarm tests
gKits Oct 29, 2025
1cef7a6
style(ds3231): reorder private funcs to the bottom
gKits Oct 30, 2025
bfa1901
docs(ds3231): add docstring for alarm modes
gKits Oct 30, 2025
74e1884
docs(ds3231): make alarm docstrings more descriptive
gKits Oct 30, 2025
f191475
chore(ds3231): fix typo in docstring
gKits Oct 30, 2025
b41316a
style(ds3231): reorder public functions
gKits Oct 30, 2025
d90383e
style(ds3231): reorder private methods
gKits Oct 30, 2025
f954d66
chore(ds3231): add missing error handling
gKits Oct 30, 2025
033d54d
feat(ds3231): use setter funcs for en/disabling instead of separate f…
gKits Nov 7, 2025
c926a29
fix(ds3231): correctly enable alarms in example
gKits Nov 7, 2025
15c485d
style(ds3231): rename SetEnable32K to SetEnabled32K for consistency
gKits Nov 7, 2025
ee995bb
refactor(ds3231): replace legacy with regmap package
gKits Nov 9, 2025
1935397
refactor(ds3231): use Write32 instead of Tx for SetAlarm1
gKits Nov 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
0.33.0
---
- **new devices**
- **ens160**
- Add ens160 i2c driver
- **lsm303dlhc**
- added support for LSM303DLHC e-Compass; (#783)
- **seesaw**
- add support for Adafruit Seesaw encoders

- **enhancements**
- **ws2812**
- add RP2350 support
- **ssd1306**
- avoid unnecessary heap allocations (#767)
- **gps**
- allow gps init with address
- **lsm6ds3tr**
- avoid unnecessary heap allocations (#766)

- **bugfixes**
- **gps**
- Fix gps time calculation (#785)


0.32.0
---
- **enhancements**
- **bmp280**
- remove alloc on read sensor data
- **ws2812**
- add 200MHz support for the Cortex-M0/rp2040

- **bugfixes**
- **ssd1306**
- remove time.Sleep from SSD1306 SPI transfer code
- **tmc2209**
- tmc2209 bug fixes (#755)

- **docs**
- **contributing**
- add driver design pointer to CONTRIBUTING.md


0.31.0
---
---
- **enhancements**
- **spi**
- update all SPI usage to use either *machine.SPI or drivers.SPI


0.30.0
---
- **new devices**
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ We would like your help to make this project better, so we appreciate any contri

We'd love to get your feedback on getting started with TinyGo. Run into any difficulty, confusion, or anything else? You are not alone. We want to know about your experience, so we can help the next people. Please open a Github issue with your questions, or you can also get in touch directly with us on our Slack channel at [https://gophers.slack.com/messages/CDJD3SUP6](https://gophers.slack.com/messages/CDJD3SUP6).

### Driver design
Before porting or writing a driver from scratch please read **[Driver Design for TinyGo](https://tinygo.org/docs/guides/driver-design)**.

### One of the TinyGo drivers is not working as you expect

Please open a Github issue with your problem, and we will be happy to assist.
Expand Down
15 changes: 7 additions & 8 deletions bmp280/bmp280.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type Filter uint
type Device struct {
bus drivers.I2C
Address uint16
buf [6]byte
cali calibrationCoefficients
Temperature Oversampling
Pressure Oversampling
Expand Down Expand Up @@ -134,8 +135,8 @@ func (d *Device) PrintCali() {

// ReadTemperature returns the temperature in celsius milli degrees (°C/1000).
func (d *Device) ReadTemperature() (temperature int32, err error) {
data, err := d.readData(REG_TEMP, 3)
if err != nil {
data := d.buf[:3]
if err = d.readData(REG_TEMP, data); err != nil {
return
}

Expand All @@ -158,8 +159,8 @@ func (d *Device) ReadTemperature() (temperature int32, err error) {
// ReadPressure returns the pressure in milli pascals (mPa).
func (d *Device) ReadPressure() (pressure int32, err error) {
// First 3 bytes are Pressure, last 3 bytes are Temperature
data, err := d.readData(REG_PRES, 6)
if err != nil {
data := d.buf[:6]
if err = d.readData(REG_PRES, data); err != nil {
return
}

Expand Down Expand Up @@ -203,7 +204,7 @@ func (d *Device) ReadPressure() (pressure int32, err error) {
}

// readData reads n number of bytes of the specified register
func (d *Device) readData(register int, n int) ([]byte, error) {
func (d *Device) readData(register int, data []byte) error {
// If not in normal mode, set the mode to FORCED mode, to prevent incorrect measurements
// After the measurement in FORCED mode, the sensor will return to SLEEP mode
if d.Mode != MODE_NORMAL {
Expand All @@ -218,9 +219,7 @@ func (d *Device) readData(register int, n int) ([]byte, error) {
}

// Read the requested register
data := make([]byte, n)
err := legacy.ReadRegister(d.bus, uint8(d.Address), uint8(register), data[:])
return data, err
return legacy.ReadRegister(d.bus, uint8(d.Address), uint8(register), data[:])
}

// convert3Bytes converts three bytes to int32
Expand Down
Loading