@@ -637,25 +637,14 @@ static uint32_t i2c_getTiming(i2c_t *obj, uint32_t frequency)
637
637
return ret ;
638
638
}
639
639
640
- /**
641
- * @brief Default init and setup GPIO and I2C peripheral
642
- * @param obj : pointer to i2c_t structure
643
- * @retval none
644
- */
645
- void i2c_init (i2c_t * obj )
646
- {
647
- i2c_custom_init (obj , 100000 , I2C_ADDRESSINGMODE_7BIT , 0x33 );
648
- }
649
-
650
640
/**
651
641
* @brief Initialize and setup GPIO and I2C peripheral
652
642
* @param obj : pointer to i2c_t structure
653
643
* @param timing : one of the i2c_timing_e
654
- * @param addressingMode : I2C_ADDRESSINGMODE_7BIT or I2C_ADDRESSINGMODE_10BIT
655
644
* @param ownAddress : device address
656
645
* @retval none
657
646
*/
658
- void i2c_custom_init (i2c_t * obj , uint32_t timing , uint32_t addressingMode , uint32_t ownAddress )
647
+ void i2c_init (i2c_t * obj , uint32_t timing , uint32_t ownAddress )
659
648
{
660
649
if (obj != NULL ) {
661
650
@@ -771,7 +760,7 @@ void i2c_custom_init(i2c_t *obj, uint32_t timing, uint32_t addressingMode, uint3
771
760
#endif
772
761
handle -> Init .OwnAddress1 = ownAddress ;
773
762
handle -> Init .OwnAddress2 = 0 ;
774
- handle -> Init .AddressingMode = addressingMode ;
763
+ handle -> Init .AddressingMode = I2C_ADDRESSINGMODE_7BIT ;
775
764
handle -> Init .DualAddressMode = I2C_DUALADDRESS_DISABLE ;
776
765
handle -> Init .GeneralCallMode = (obj -> generalCall == 0 ) ? I2C_GENERALCALL_DISABLE : I2C_GENERALCALL_ENABLE ;
777
766
handle -> Init .NoStretchMode = (obj -> NoStretchMode == 0 ) ? I2C_NOSTRETCH_DISABLE : I2C_NOSTRETCH_ENABLE ;
0 commit comments