Bump version to 0.3.0 - #323
Closed
ainyan03 wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Closing for now: more changes are planned before the next release, so the version bump comes later with the full set. The migration notes here will be carried over into that release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release preparation: bump the version to 0.3.0 (library.json / library.properties /
idf_component.yml / src/gitTagVersion.h). The minor version rises because this
release changes public APIs on the IO expander and PMIC classes; everything below
is a source-level or behavioural change from 0.2.20, listed here so it can serve
as the migration reference.
Breaking:
M5PM1_Class::pwr_src_tis now a bitmap (#316)The enumerators changed value, and
getPowerSourcereports every source that iscurrently valid rather than one exclusive state.
vin = 0,vinout = 1,battery = 2,unknown = 3none = 0,vin = 1 << 0,vinout = 1 << 1,battery = 1 << 2getPowerSource() == batterygetPowerSource() & M5PM1_Class::batteryThis is the one change here that does not announce itself: equality comparisons
against
vin,vinoutorbatterystill compile and must be rewritten as bittests, because the values moved —
batteryused to be 2, which is now the valueof
vinout. Only code naming the removedunknownfails to compile. Bit 1 reads0 while the 5 V boost is enabled, and more than one bit can be set at once.
Breaking: the IO expander pull API takes an explicit mode (#320)
enablePull(pin, true)setPullMode(pin, pull_up)orsetPullMode(pin, pull_down)enablePull(pin, false)setPullMode(pin, pull_none)setPullMode(pin, true)setPullMode(pin, pull_up)setPullMode(pin, false)setPullMode(pin, pull_down)enablePullis removed andsetPullModetakesIOExpander_Base::gpio_pull_tinstead of a
bool, so every old call fails to compile: abooldoes notconvert to an enumeration. It also returns
boolnow, true only when therequested state was fully established, so a partially failed I2C write no longer
leaves both resistors enabled silently.
Two defects disappear with it. On
M5IOE1_Class,enablePull(pin, true)set thepull-up without clearing the pull-down, so a pin that already had a pull-down
ended up with both. On
PI4IOE5V6408_Class, nothing ever enabled the pullregister, so pull-ups worked only because the power-on default happened to have
them enabled.
Breaking: the PWM duty methods state their unit (#321)
M5IOE1_Class::setPwmDuty(0, raw, enable, polarity)setPwmDuty12bit(pwm_ch1, raw, polarity, enable)pwm_ch1…pwm_ch4(underlying values 0-3 unchanged)boolpolarity argumentm5::pwm_polarity_t::normal/::invertedsetPwmDutyno longer exists; percent and raw values go throughsetPwmDutyPercent(0-100) andsetPwmDuty12bit(0-4095). OnM5IOE1_Classthelast two arguments also swap from
(enable, polarity)to(polarity, enable),matching
M5PM1_Classand the standalone M5IOE1 and M5PM1 drivers, whosesetPwmDutymeans percent. The old name is left vacant so a call written againsteither meaning fails to compile instead of changing behaviour. The channel
parameter is
pwm_channel_trather than a number, duty parameters arestd::uint32_twith out-of-range values rejected rather than masked, and themethods return
bool.Breaking:
M5IOE1_Class::setPwmFrequencyreturnsbool(#322)The I2C write status is returned instead of discarded, matching
M5PM1_Class::setPwmFrequency. Ordinary calls that ignore the result staysource-compatible; only code that depends on the exact member-function type has
to move from
void (M5IOE1_Class::*)(std::uint16_t)tobool (M5IOE1_Class::*)(std::uint16_t).Added
M5PM1_Classgains PWM control:setPwmFrequency,setPwmDutyPercentandsetPwmDuty12bit(Add PM1 PWM control and use it for the ToughC5 buzzer #318).another firmware is silenced before
beginreturns (Add PM1 PWM control and use it for the ToughC5 buzzer #318).Fixed