Add SPI library for 1.0, do some small fixed