1 /* (CC-BY-NC-SA) ROBIN KRENS - ROBIN @ ROBINKRENS.NL
4 * 2019/7/20 - ROBIN KRENS
8 * Main initialize basic components of the board
9 * and jumps to a terminal
17 #include <sys/robsys.h>
20 #include <lib/regfunc.h>
22 #include <lib/stdio.h>
23 #include <lib/string.h>
24 #include <lib/tinyprintf.h>
26 #include <drivers/uart.h>
27 #include <drivers/led.h>
28 //#include <drivers/tm1637.h>
29 //#include <drivers/at24c.h>
30 //#include <drivers/tsensor.h>
31 //#include <drivers/mk450_joystick.h>
32 #include <drivers/st7735s.h>
35 #include <lib/syscall.h>
37 int test3(int i, int j) {
39 volatile uint32_t * sp = get_msp();
44 "mrseq %0, msp" "\n\t"
45 "mrsne r0, psp" : "=r" (sp) ); */
47 for (int i = 0; (sp + i) < 0x20010000; i++) {
48 printf("ADDRESS: %p, VALUE: %x\n", (sp + i), *(sp + i));
55 int test2(int i, int j) {
62 int test(int i, int j) {
72 /* Initialize the clock system, */
75 /* Setup the interrupt vector table */
78 /* Initialze basic input and output over serial */
84 /* Cortex M* integrated systick, can be replaced
85 * by the more accurate RTC.
89 /* Set up a very small libc library */
90 init_printf(NULL, putc);
94 //printf("%p\n", get_kheap());
96 /* Display some basic info at startup */
102 /* Real time clock */
105 // printf("press any key to start\n");
106 // asm volatile ("wfi");
109 theos_test(0xA1, 0xA2);
116 /* LED Segment Driver */
119 /* ASM Blocking routine */
120 //for (int i = 0; i < 1000; i++)
125 uint16_t temp = tsensor_get_temp();
126 printf("Current temperature: %d °C\n", temp); */
128 /* ADC Joystick module */
132 /* Start up terminal */
135 /* Should not be here, endless loop */