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
#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 );

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!");

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

//usb_serial_init_connection();
    sleep(HZ*2);

    usb_serial_send("Hello USB SERIAL world!", 23);
    printf("serial usb string send");
    while(1)
    {
        yield();
    }
}