change var name for i2c
add SPI implementation
fix build warning
fix build warning