#include "hhd32f0xx.h"
#include "hhd_sys.h"
#include "hhd_gpio.h"

void test()
{
	uint32_t i;
	
	//trim to 60M. not gurantee 60M.
	SYSCON->IRCCTRL.all = 0x3f;
	SYSCON->SYSAHBCLKDIV.all = 0x1;
	



	
  for(i=0;i<10000;i++)
	{
		/* -------- Invert GPIO PA0 -----------------------*/
		GPIO_InvertOutPin(GPIOA,PIN0);
	}

	
	//trim back to 48M
	SYSCON->IRCCTRL.all = 0x3d;
	SYSCON->SYSAHBCLKDIV.all = 0x2;
}

void testsp(int i)
{
	while(i--);
}
