//HHD32f0xx SPI flash demo Main Program

#include "hhd32f0xx.h"
#include "hhd_spiflash.h"
#include "hhd_sys.h"
void delay(void)
{
	uint32_t i=0;
	while (i++ < 0xfff);
}
//Main function entry
int main(void)
{

	uint8_t flashid=0,flashdata[16];

	
	/* ----------- System Initialization ---------------------- */
	SYS_SystemInitial();

	
	
	/* ----------- SPI Flash interface initialization --------- */
	SPIFlashInit();

	
	/* ----------- Get SPI Flash Device ID -------------------- */
	SPIFlashID(&flashid);

	
	/* ----------- SPI Flash Read 16 bytes -------------------- */
	SPIFlashRead(0, flashdata, 16);

	
	
	while(1);
}

