Skip to content

Fix two assert_param calls. #1242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions libraries/Wire/src/utility/twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ void i2c_custom_init(i2c_t *obj, uint32_t timing, uint32_t addressingMode, uint3

handle->Instance = obj->i2c;
#ifdef I2C_TIMING
handle->Init.Timing = i2c_getTiming(obj, timing);
handle->Init.Timing = i2c_getTiming(obj, timing);
#else
handle->Init.ClockSpeed = i2c_getTiming(obj, timing);
/* Standard mode (sm) is up to 100kHz, then it's Fast mode (fm) */
Expand All @@ -706,7 +706,7 @@ void i2c_custom_init(i2c_t *obj, uint32_t timing, uint32_t addressingMode, uint3
}
#endif
handle->Init.OwnAddress1 = ownAddress;
handle->Init.OwnAddress2 = 0xFF;
handle->Init.OwnAddress2 = 0;
handle->Init.AddressingMode = addressingMode;
handle->Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
handle->Init.GeneralCallMode = (obj->generalCall == 0) ? I2C_GENERALCALL_DISABLE : I2C_GENERALCALL_ENABLE;
Expand Down