Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
111 | mikeljo | 1 | #include <avr/io.h> |
2 | #include <avr/pgmspace.h> |
||
3 | #include <avr/interrupt.h> |
||
4 | |||
5 | #include "main.h" |
||
6 | #include "menu.h" |
||
7 | #include "lcd.h" |
||
8 | #include "settings.h" |
||
9 | |||
10 | |||
11 | void toggle_display(void) |
||
12 | { |
||
13 | cli(); |
||
14 | |||
15 | if (LCD_ORIENTATION == 0) |
||
16 | LCD_ORIENTATION = 4; |
||
17 | else LCD_ORIENTATION = 0; |
||
18 | |||
19 | eeprom_write_byte(&EEPromArray[EEPROM_ADR_ORIENTATION], LCD_ORIENTATION); |
||
20 | |||
21 | lcd_init(); |
||
22 | |||
23 | sei(); |
||
24 | } |
||
25 | |||
26 | void LCD_settings(void) |
||
27 | { |
||
28 | |||
29 | // uint8_t parameter; |
||
30 | |||
31 | char loop = 1; |
||
32 | |||
33 | while(loop) |
||
34 | { |
||
35 | lcd_cls(); |
||
36 | |||
37 | lcd_printp(PSTR("Einstellungen:\r\n"),0); |
||
38 | lcd_printp(PSTR("\r\n"),0); |
||
39 | lcd_printp(PSTR("Orientierung\r\n"),0); |
||
40 | lcd_printp(PSTR("Linie\r\n"),0); |
||
41 | lcd_printp(PSTR("Rechteck\r\n"),0); |
||
42 | // lcd_printp(PSTR("\r\n"),0); |
||
43 | lcd_printp(PSTR("Exit\r\n"),0); |
||
44 | |||
45 | // parameter = menu_choose(1,5,0); |
||
46 | |||
47 | switch(menu_choose(2,5,15)) |
||
48 | { |
||
49 | case 2: |
||
50 | toggle_display(); // LCD-Modus |
||
51 | break; |
||
52 | case 3: |
||
53 | lcd_cls(); |
||
54 | lcd_line(10,20,100,50, 1); |
||
55 | while ((key != key_enter) && (key != key_esc)); |
||
56 | break; |
||
57 | case 4: |
||
58 | lcd_cls(); |
||
59 | lcd_rect (10,20,100,40, 1); |
||
60 | while ((key != key_enter) && (key != key_esc)); |
||
61 | break; |
||
62 | case 5: |
||
63 | loop = 0; |
||
64 | break; |
||
65 | default: |
||
66 | loop = 0; |
||
67 | break; |
||
68 | } |
||
69 | } |
||
70 | } |