@@ -201,10 +201,11 @@ static uint16_t read_adc_humidity(void)
201
201
ZTEST (i2c_controller_to_sensor , test_i2c_basic_memory_read )
202
202
{
203
203
int err ;
204
- uint32_t i2c_config = I2C_SPEED_SET (I2C_SPEED_FAST ) | I2C_MODE_CONTROLLER ;
204
+ uint32_t i2c_config = I2C_SPEED_SET (CONFIG_TEST_I2C_SPEED ) | I2C_MODE_CONTROLLER ;
205
205
uint8_t entire_sensor_memory [SENSOR_MEMORY_SIZE_IN_BYTES ] = {0 };
206
206
207
207
TC_PRINT ("Device address 0x%x\n" , DEVICE_ADDRESS );
208
+ TC_PRINT ("I2C speed setting: %d\n" , CONFIG_TEST_I2C_SPEED );
208
209
209
210
err = i2c_configure (i2c_device , i2c_config );
210
211
zassert_equal (err , 0 , "i2c_configure' failed with error: %d\n" , err );
@@ -250,10 +251,11 @@ ZTEST(i2c_controller_to_sensor, test_i2c_controlled_sensor_operation)
250
251
int16_t temperature = 0 ;
251
252
uint32_t pressure = 0 ;
252
253
uint32_t humidity = 0 ;
253
- uint32_t i2c_config = I2C_SPEED_SET (I2C_SPEED_STANDARD ) | I2C_MODE_CONTROLLER ;
254
+ uint32_t i2c_config = I2C_SPEED_SET (CONFIG_TEST_I2C_SPEED ) | I2C_MODE_CONTROLLER ;
254
255
uint8_t measurements_left = MEASUREMENT_CYCLES + 1 ;
255
256
256
257
TC_PRINT ("Device address 0x%x\n" , DEVICE_ADDRESS );
258
+ TC_PRINT ("I2C speed setting: %d\n" , CONFIG_TEST_I2C_SPEED );
257
259
258
260
err = i2c_configure (i2c_device , i2c_config );
259
261
zassert_equal (err , 0 , "i2c_configure' failed with error: %d\n" , err );
0 commit comments