在E8卡上通过linux的spi驱动读写高通字库芯片。
spi是分主从的,字库芯片不会主动通过spi发送数据。只有在linux上发起读操作的时候,字库才会把他的数据发送出来。
/*
* spi mode
*/
ret = ioctl(fd, SPI_IOC_WR_MODE, &mode);
if (ret == -1)
printf("can't set spi mode");
ret = ioctl(fd, SPI_IOC_RD_MODE, &mode);
if (ret == -1)
printf("can't get spi mode");
/*
* bits per word
*/
ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits);
if (ret == -1)