SPI_Flash_Write_Page(tx,0x0,1);把tx里的数发到(0x0)w25x的0地址,1---写一位;
读指令;
SPI_Flash_Read(rx,0x0,1);
readtype=rx[0];
KNY12864_write_com(0x88);
KNY12864_write_data(0x30+(readtype&0x0f));
KNY12864_write_com(0x89);
KNY12864_write_data(0x30+((readtype>>4)&0x0f));
readtype=rx[1];
KNY12864_write_com(0x8a);
KNY12864_write_data(0x30+(readtype&0x0f));
KNY12864_write_com(0x8b);
奇怪的是读的时候居然读了两位,有高手知道吗? |