root / trunk / code / projects / test / testlcd.c @ 902
History | View | Annotate | Download (1.13 KB)
1 | 789 | dsschult | #include <dragonfly_lib.h> |
---|---|---|---|
2 | |||
3 | |||
4 | /**
|
||
5 | * LCD Rules
|
||
6 | * - when changing put formats (from string to int or back)
|
||
7 | * the screen will clear and start printing at beginning
|
||
8 | * - when outputting again in same format, an append op is performed
|
||
9 | * - text wraps to next line, and to beginning
|
||
10 | * - when wrapping to beginning, screen is not cleared
|
||
11 | * - puti only does signed ints
|
||
12 | */
|
||
13 | |||
14 | int testlcd(void) { |
||
15 | usb_init(); |
||
16 | usb_puts("usb turned on\n");
|
||
17 | lcd_init(); |
||
18 | usb_puts("lcd turned on\n");
|
||
19 | lcd_clear_screen(); |
||
20 | usb_puts("lcd screen cleared\n");
|
||
21 | delay_ms(1000);
|
||
22 | |||
23 | // start testing lcd
|
||
24 | lcd_puts("this is a test, a really long test");
|
||
25 | lcd_puts("this is a test, a really long test. this is a test, a really long test");
|
||
26 | usb_puts("test writing string to lcd: 'this is a test, a really long test'\n");
|
||
27 | delay_ms(10000);
|
||
28 | |||
29 | /*lcd_clear_screen();
|
||
30 | usb_puts("lcd screen cleared\n");
|
||
31 | lcd_puti(1000000);
|
||
32 | lcd_puti(100000);
|
||
33 | lcd_puti(10000);
|
||
34 | lcd_puti(1000);
|
||
35 | lcd_puti(100);
|
||
36 | lcd_puti(10);
|
||
37 | lcd_puti(1);
|
||
38 | usb_puts("test writing int to lcd: 1000000,100000, 10000, 1000, 100, 10, 1\n");
|
||
39 | delay_ms(10000);
|
||
40 | */
|
||
41 | // end testing lcd
|
||
42 | return 0; |
||
43 | } |
||
44 |