1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "inttypes.h"
#include "string.h"
#include "cpu.h"
#include "system.h"
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
#include "backlight.h"
#include "backlight-target.h"
#include "font.h"
#include "common.h"
#include "version.h"
#include "logf.h"
#include "usb.h"

extern int show_logo( void );

uint32_t volatile dev_info[1024];

void dev_info_monitor(void)
{
    static int i = 0;

    if (i < 100)
      dev_info[i++] = DEV_INFO;
}

void main(void)
{
    int i;

    _backlight_init();

    system_init();
    kernel_init();
    enable_irq();

    lcd_init_device();
    _backlight_on();
    font_init();
    lcd_setfont(FONT_SYSFIXED);

    printf("Hello World!");
    tick_add_task(dev_info_monitor);

    usb_init();
    usb_core_enable_driver(USB_DRIVER_SERIAL, true);
    usb_enable(true);

    sleep(HZ*2);

    for (i=0; i<100; i=i+5)
    {
        printf("0x%x 0x%x 0x%x 0x%x 0x%x", dev_info[i], dev_info[i+1], dev_info[i+2], dev_info[i+3], dev_info[i+4]);
    }

    while(1)
    {
  yield();
    }
}