transform spi to usart,and usart to spi.