Releases: electro-smith/libDaisy
v8.1.0 - WAV Files, Sensors, and Bugfixes
Features
- Audio Files: Reworked WavPlayer, added helpful utilies for working with WAV files (WavParser, FileTable), and added examples for demonstrating their usage.
- SDMMC: HAL_SD_ErrorCallback is now being handled to help with error handling
- note: this may cause things that would previously stall indefinitely to now cause an error. Often, the error will occur in
f_sync()orf_close()since that is where the disk i/o tends to occur. The SDMMC_HelloWorld example has been updated to better handle these errors.
- note: this may cause things that would previously stall indefinitely to now cause an error. Often, the error will occur in
- MPR121: Added demonstration program using MPR121 to examples.
Bug Fixes
- SDMMC: fix an issue where status flags were optimized out, resulting in very long while loops
- CMake: The platform definition for the new FileReader in CMake is now properly set up for use in targets outside of libDaisy.
- ICM20948: Fixed an incorrect number of arguments on call to
ReadExternalRegister. - MPR121: Fixed i2c i/o issues that led to problems reading correct data from the sensor.
- version: The version.h hasn't been updated since v4.0.0 -- it has now been updated to the current version.
Bootloader
- Update to v6.4. This version resolves issues related to i/o timeouts that could occur after programming devices hundreds/thousands of times with larger binary files.
Contribution Summary
- Improved WavPlayer and Extra Utilities by @stephenhensley in #677
- Add missing volatile to status flags to prevent "infinite" loop after optimization by @TheSlowGrowth in #678
- Fix CMake compile definition leakage by @Alloyed in #687
- Fix ICM20948 ReadExternalRegister argument count by @Brokezawa in #686
- Add HAL_SD_ErrorCallback to handle DMA errors gracefully by @CyberDuck79 in #685
- Use I2CHandle::ReadDataAtAddress for reading registers in mpr121.h by @kaathewise in #688
- Added example program for the MPR121 capacitive touch sensor. by @stephenhensley in #689
- Example - Improved result handling in SDMMC_HelloWorld by @stephenhensley in #690
- Bootloader v6.4 - Improved I/O handling to avoid timeouts by @stephenhensley in #691
New Contributors
- @Brokezawa made their first contribution in #686
- @CyberDuck79 made their first contribution in #685
- @kaathewise made their first contribution in #688
v8.0.0 - Hardware PWM, QSPI Stability, CMake, and More
v8.0.0
Features
- SSD1307 Driver
- Drivers for SSD1327 and the SSD1351
- DMA support for the SPI OLED Transport Drivers
- Configurable timing delay to the CD4021 shift register driver
- Hardware PWM
Bug Fixes
- QSPI: Fix for a known instability issue. Resolves intermittent bootup issue where QSPI could set itself to write-protected mode.
- USB Host: Added USBH MIDI source file to CMakeLists for CMake builds
- I2C: Fixed issue with I2C4 not working
- I2C: minor breaking change: Fixed inconsistency of address-shifting of
ReadDataAtAddressandWriteDataAtAddressto match the other methods. - MIDI: Fixed an unrecoverable crash with UART transport if the input shorted to GND for a full UART frame.
- System: Fixed inaccurate clock division factor for
DelayMsandGetMsto be correct. - WavWriter: Fixed bug where the last samples of the recording were not being flushed to the output file.
Other
- The GPIO/Pin migration has been completed within the library, and the
dsy_gpioanddsy_gpio_pinstructs are deprecated. - Minor improvements to
daisy::Colortype - Added explicit setters/getters to
daisy::AnalogControlfor the scale/offset values - Added status check methods for USB Host
- Improvements to CMake builds
- README updated with links to
daisy.audiosite. - Improved documentation, and cleaned up WM8731 driver
- Added Hardware PWM example
- Added WavWriter example
Bootloader
- The included bootloader binaries have been updated to v6.3 - This version integrates the above QSPI changes, and improves the boot-jump sequence for apps running directly from QSPI memory.
Migration
I2C Address Shifting
There was an inconsistency between the generic Read and Write methods that automatically left-shifted the device address by one bit, and the ReadDataAtAddress and WriteDataAtAddress functions that required the user to manually shift the address by one.
The internal devices that were affected by this change have been updated internally so this change will have minimal breaking effects.
Those devices are:
- PCM3060
- MCP23x17
To migrate existing code for external device drivers any manual left-shifting of the device address for the ReadDataAtAddress or WriteDataAtAddress functions must be removed.
GPIO and Pin
Any remaining instances of dsy_gpio or dsy_gpio_pin should be converted to the newer GPIO and Pin structs.
The constant pin references for DaisySeed and DaisyPatchSM have both been updated to the new Pin struct.
Objects within libDaisy no longer accept the old types, and will need to be updated in application code.
Here are some examples of how to migrate from the old types to the new types.
//////////////////////////////////////////
// Initialization:
//////////////////////////////////////////
// Old:
dsy_gpio_pin pa1 = {DSY_GPIOA, 1};
dsy_gpio gpio1;
gpio1.mode = DSY_GPIO_OUTPUT_PP;
gpio1.pull = DSY_GPIO_NOPULL;
gpio1.pin = pa1;
dsy_gpio_init(&gpio1);
// New:
Pin pa1 = Pin(PORTA, 1);
GPIO gpio1;
gpio1.Init(pa1, GPIO::Mode::OUTPUT, GPIO::Pull::NOPULL);
//////////////////////////////////////////
// Read
//////////////////////////////////////////
// Old:
uint8_t state = dsy_gpio_read(&gpio1);
// New:
bool state = gpio1.Read();
//////////////////////////////////////////
// Write
//////////////////////////////////////////
// Old:
dsy_gpio_write(&gpio1, 1); // HIGH
dsy_gpio_write(&gpio1, 0); // LOW
// New:
gpio1.Write(true); // HIGH
gpio1.Write(false); // LOW
//////////////////////////////////////////
// Toggle
//////////////////////////////////////////
// Old:
dsy_gpio_toggle(&gpio1);
// New:
gpio1.Toggle();New Contributors
- @a7v7 made their first contribution in #625
- @asavartsov made their first contribution in #627
- @takumi-ogata made their first contribution in #661
- @cvpines made their first contribution in #667
- @grawlinson made their first contribution in #659
- @Alloyed made their first contribution in #655
- @jacobvosmaer made their first contribution in #623
v7.1.0
v7.0.1
v7.0.0
v7.0.0
Features
- Update internal CMSIS and HAL. (#582) (Fixes #538, #578)
- Adds new HAL module support via
src/sys/stm32h7xx_hal_conf.h- Digital Temperature Sensor
- Filter Math Accelerator (FMAC)
- Octo-SPI Controller (OSPI)
- Digital Filter for Delta-Sigma Modulation
- CORDIC co-processor block
- Moves relevant HAL, CMSIS, Middleware code to submodules:
Bugfixes
- Very minor bugfix in CpuLoadMeter_gtest.cpp so that a number would no longer overflow when bitshifting left
Migrating
- Updating an existing libDaisy install via
git pullwill require you to rungit restore . --recurse-submodulesbefore it will compile.- Note, this will also undo any local changes you may have to the library. Make sure to stash those!
- If you clone a fresh copy of libDaisy with
git clone https://www.github.com/electro-smith/libDaisy --recurse-submodules, this will not be necessary - Breaking changes:
GPIO::Mode::OUTPUT_ODrenamed toGPIO::Mode::OPEN_DRAINdue to a name conflict collision- Compiled code size has increased by up to 7%
v6.0.0
v6.0.0
Features
- bootloader: Add local BootloaderBlink example for testing the bootloader and its various configs (#599)
- bootloader: Add four bin variants: internal / external DFU, and 10ms / 2000ms timeouts (#599)
- core: Add USE_DAISYSP_LGPL flag to core/Makefile for DaisySP_LGPL support. (#601)
- bootloader: added
System::BootloaderMode::DAISY,System::BootloaderMode::DAISY_SKIP_TIMEOUT, andSystem::BootloaderMode::DAISY_INFINITE_TIMEOUToptions toSystem::ResetToBootloadermethod for better firmware updating flexibility. (#599)
Bug fixes
- Fix link to electro-smith website in README (#605)
- bootloader: pins
D0,D29andD30are no longer stuck when using the Daisy bootloader (#599) - Color: Fixed bug with init not setting the green value correctly (#596)
Bootloader
- This version of libDaisy and greater will be compatible with any version of the Daisy bootloader, meaning you won't have to update the bootloader on your product if you want the latest changes to libDaisy.
- However, for newer versions of the bootloader, you must use a compatible version of libDaisy.
- Daisy bootloader v6.0 and up will only be compatible with libDaisy v5.3 and up.
v5.4.0 - MIDI, Seed 2 DFM, and more
v5.4.0
Features
- adc: added ConversionSpeed configuration to the AdcChannelConfig (#579)
- board: Updated Daisy board definitions to use new Pin system (#581)
- board: added official support for new Daisy Seed2 DFM hardware (built in compatibility with DaisySeed class).
- device: added driver for SK9822 (#574)
- examples: added a number of minimal examples for the Seed/Seed2DFM
- gatein: added new Init function that is compatible with newer C++
Pintype.
Bug Fixes
- patchsm: Corrected gate out pin assignment confusion added by (#417) as noted by apbianco and tele_player
- midi: improvements to UART transport stability, and fixes to parser (#566, #564, #583)
- qspi: fixed memory cache invalidation for Persistent Storage (#572)
- spi: fixed issue with unpredictable pin states at end of transmission (#553, #559)
Other
v5.3.0 - software SPI for OLED, and minor bug fixes
v5.3.0
Features
- driver: Software SPI transport
SSD130x4WireSoftSpiTransportadded for the OLED Display driver. (#551)
Bug Fixes
- driver: Fixed a compiler error in
Max11300Driver::WriteAnalogPinVolts() - driver: Fixed error reading multiple registers at once from the MPC23x17 GPIO expanders (#550)
- seed: Fixed out of range pin definitions for extra GPIO on the Daisy Seed2 DFM (#544)
- patchsm: Fixed issue where updating the audio callback params didn't update control samplerate (#543)
v5.2.0 - Legio, UART/MIDI Bugfix, and sensors galore
Features
- board: added board support for Noise Engineering legio platform
- audio: added
output_compensationvalue to config struct to allow for post-scaling of uneven audio passthru levels. - util: added a multiply operator to the Color class for scaling a color by a single factor.
- device: Added ICM20948 sensor device driver
- device: Added DPS310 device driver
- device: Added MPR121 device driver
- device: Added APDS9960 device driver
- device: Added TLV493D device driver.
- device: Added neotrellis driver
- device: Added neopixel driver
Bug fixes
- uart: fixed bug with fifo-dma-receive mode that would result in erratic reads over time. Fixes issues with UART (TRS/DIN) MIDI parsing
v5.1.0 - Callbacks and Bug Fixes
v5.1.0
Features
- tim:
TimerHandlenow has callbacks each time the Period has elapsed. These can be enabled withTimerHandle::Config::enable_irqat Init time. - bootloader: Working with the bootloader has been simplified. See the new guide for updates on usage
- usb:
USBHostclass has added support for user callbacks on device connection, disconnection, and when the MSC class becomes active. - uart: Adds DMA RX and TX modes, similar to how they work on the I2C and SPI.
- uart: Update function names to be more in line with the new DMA / Blocking scheme.
- The old methods are wrappers for the new ones to preserve backwards compatibility, but will be removed in a future version.
- Affected functions:
PollReceive,PollTx,StartRx,RxActive,FlushRx,PopRx,Readable
Bug Fixes
- util: PersistentStorage class had a bug where calling the
RestoreDefaultsfunction would cause a crash - usb: LL HAL files for USB were updated to prevent timing issues when running with optimization
- spi: Add IRQ handlers for SPI2-5. These should work with DMA now.
- midi: bugs related to running status bytes for note off, and single data-byte messages have been resolved
Other
- build: core/Makefile has had the
-fnorttiflag added to match libDaisy's Makefile - bootloader: local version of daisy bootloader has been updated to improve stability
- spi: Added examples for blocking TX and DMA TX, added a writeup explaining how to use the SPI on the Daisy
- uart: Adds examples for common modes of communication, both DMA, blocking, FIFO, and mixed.