make a i2c class from origin c codes