refine i2c.c spi.h and spi.c