From 05eae03cb6e5f54548f189b149fe47bab31dedc2 Mon Sep 17 00:00:00 2001 From: Ben Iofel Date: Tue, 12 Mar 2019 18:00:40 -0400 Subject: [PATCH] twi: enable general call mode In I2C, sending data to address 0 sends it to all devices on the bus. This setting controls whether the slave device ACKs general calls or not. --- cores/arduino/stm32/twi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/arduino/stm32/twi.c b/cores/arduino/stm32/twi.c index 4c4d585582..30a500191b 100644 --- a/cores/arduino/stm32/twi.c +++ b/cores/arduino/stm32/twi.c @@ -193,7 +193,7 @@ void i2c_custom_init(i2c_t *obj, i2c_timing_e timing, uint32_t addressingMode, u handle->Init.OwnAddress2 = 0xFF; handle->Init.AddressingMode = addressingMode; handle->Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; - handle->Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; + handle->Init.GeneralCallMode = I2C_GENERALCALL_ENABLE; handle->Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; handle->State = HAL_I2C_STATE_RESET;