Skip to content

Commit 1b94e23

Browse files
committed
STM32: I2C: remove warning
Remove unused variables to avoid warnings.
1 parent c6a898d commit 1b94e23

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

targets/TARGET_STM/i2c_api.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,14 +492,12 @@ int i2c_start(i2c_t *obj) {
492492
int i2c_stop(i2c_t *obj) {
493493
struct i2c_s *obj_s = I2C_S(obj);
494494
I2C_TypeDef *i2c = (I2C_TypeDef *)obj_s->i2c;
495-
I2C_HandleTypeDef *handle = &(obj_s->handle);
496-
int timeout;
497495

498496
// Generate the STOP condition
499497
i2c->CR1 |= I2C_CR1_STOP;
500498

501499
/* In case of mixed usage of the APIs (unitary + SYNC)
502-
* re-inti HAL state
500+
* re-init HAL state
503501
*/
504502
if(obj_s->XferOperation != I2C_FIRST_AND_LAST_FRAME)
505503
i2c_init(obj, obj_s->sda, obj_s->scl);

0 commit comments

Comments
 (0)