Ejemplo n.º 1
0
void bspInit(void) {
  lowLevelInit();
  ledsInit();
  buttonsInit();
  accelerometerInit();
  potentiometerInit();
  lcdInit();
}
Ejemplo n.º 2
0
int main(void)
{
	lowLevelInit();
	wakeupInit();
	exceptionHandlerInit();

	int i = 0;
	
	init_Uart0(9600);
	init_Uart1(9600);
	int buff = 0;

	rprintf_devopen(uart0_putchar);
	//rprintf_devopen(uart1_putchar);

	delay_ms(2000);
	rprintf("-------------------------------------------------------------------------\n");
	rprintf("--                    System Boot complete...                          --\n");
	rprintf("-------------------------------------------------------------------------\n");

	printf("You can use printf but it will bloat your code!!!\n");
	//printf("Only STDIO printf can print floating-point numbers: %f\n", 1.23f);

	delay_ms(1000);
	printf("Test Memory allocation of 1024 bytes: ");
	char *memPointer = malloc(1024);
	printf("Memory pointer = %p\n", memPointer);
         	
    uart1_putchar('*');

	while (1)
	{
		rprintf("-- Hello World %i --\n", ++i);
		uart1_putchar('*');
		delay_ms(1000);
        //buff = uart1_getchar();
        //uart1_putchar(buff);
		
	}

	return 0;
}