Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Src/RotaryEncoder_AS5600.c
- Revision:
- 2:d45b3a0f19a2
- Parent:
- 0:dffe3a22587d
--- a/Src/RotaryEncoder_AS5600.c Fri Sep 01 15:32:42 2017 +0000
+++ b/Src/RotaryEncoder_AS5600.c Sat Sep 02 06:56:21 2017 +0000
@@ -69,13 +69,10 @@
*/
void initEncoder(void)
{
+ HAL_StatusTypeDef status;
+ uint8_t AS5600_status;
AS5600_init_start:
- assert_param(AS5600_hi2c.Init.ClockSpeed == I2C_CLOCK_SPEED);
-
- HAL_StatusTypeDef status;
-
// Read AS5600 status register
- uint8_t AS5600_status;
status = HAL_I2C_Mem_Read(&AS5600_hi2c, AS5600_DEV_ADDRESS, AS5600_REG_STATUS,
I2C_MEMADD_SIZE_8BIT, &AS5600_status, 1, AS5600_I2C_TIMEOUT_MS);
if (status != HAL_OK) {