12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include <stdarg.h>
- #include "yc11xx.h"
- #include "ycdef.h"
- #include "yc11xx_uart.h"
- #include "yc11xx_gpio.h"
- #include "yc11xx_qspi.h"
- #include "system.h"
- uint8_t test_data[16]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
- void QSPI_TEST();
- void QSPI_TEST()
- {
- uint8_t Rdbuf[16];
- memset(Rdbuf,0,16);
- uint32_t ID=0;
- int i=10000;
- while(i--);
- ID=qspi_flash_ManufactureID();
- MyPrintf("\r\n ID=%x \r\n",ID);
- QSPI_SectorEraseFlash(0x7f000);
- QSPI_WriteFlashData(0x7f000,16,test_data);
- QSPI_ReadFlashData(0x7f000,16,Rdbuf);
- for(int i=0;i<16;i++)
- {
- MyPrintf("Rdbuf[%d]=%d \r\n",i,Rdbuf[i]);
- }
- }
- int main(void)
- {
- #ifdef DEBUG_QSPI
- printport_init();
- MyPrintf("\r\n**********This is QSPI Test Demo**********\r\n");
- #endif
- QSPI_TEST();
-
- }
|