remove unused code
This commit is contained in:
parent
f6f69479a5
commit
085a627b76
|
@ -84,7 +84,6 @@ void i2c_master(bool fast)
|
|||
}
|
||||
timer_set_period(TIM(I2C_TIMER), I2C_TIMEOUT*9); // use factor to wait for all 9 bits to be transmitted
|
||||
timer_update_on_overflow(TIM(I2C_TIMER)); // only use counter overflow as UEV source (use overflow as timeout)
|
||||
//timer_enable_irq(TIM(I2C_TIMER), TIM_DIER_UIE); // enable update interrupt for timer
|
||||
|
||||
// wait one transaction for the signal to be stable (some slave have issues when an I2C transaction immediately follows)
|
||||
timer_set_counter(TIM(I2C_TIMER),0); // restart timer
|
||||
|
@ -119,7 +118,6 @@ bool i2c_read(uint8_t slave, const uint8_t* address, size_t address_size, uint8_
|
|||
timer_disable_counter(TIM(I2C_TIMER)); // disable timer for timeouts
|
||||
if (timer_get_flag(TIM(I2C_TIMER), TIM_SR_UIF)) { // timeout occurred
|
||||
timer_clear_flag(TIM(I2C_TIMER), TIM_SR_UIF); // clear flag
|
||||
//led_toggle();
|
||||
goto error;
|
||||
}
|
||||
if (!(I2C_SR2(I2C(I2C_I2C)) & I2C_SR2_MSL)) { // verify if in master mode
|
||||
|
|
Loading…
Reference in New Issue